Posts

less - Unix / Linux command line reader cheat sheet

Useful pdf file that contains the common commands used in less command line reader  https://drive.google.com/file/d/1gxrGEPws6aJBsYa1LL6pkAMSkq-13hKI/view?usp=drive_link

vi - Unix / Linux command line editor cheat sheat

Useful pdf file that contains the common commands used in vi command line editor https://drive.google.com/file/d/1gog8Jn6xzvkVpanxpaX6m2rHKyWSQyc9/view?usp=drive_link

Jetbrains IDE - IntelliJ Customisation for Developer Productivity

The following changes to any Jetbrains IDE (IntelliJ) makes developers more productive. Settings Changes: Settings -> Appearance & Behaviour -> Appearance -> Use custom font -> Size 16 Settings -> Appearance & Behaviour -> Appearance -> UI Options -> Use project colours in main toolbar Settings -> Appearance & Behaviour -> Appearance -> UI Options -> Compact Mode Settings -> System Settings -> Confirm before exiting the IDE Settings -> System Settings -> Project -> Reopen projects on startup Settings -> System Settings -> Project -> open project in : New window Settings -> Editor -> Font -> Size 16 Settings -> Editor -> General -> Soft Wraps -> Soft-wrap these files -> *.* Settings -> Editor -> General -> Breadcrumbs -> Show Breadcrumbs -> Select all checkboxes Settings -> Advanced Settings -> Editor -> Tick Hide floating toolbar for code editing Settings -> Advanc

sdkman - Multiple versions of Java JDK on Mac

Install sdkman curl -s "https://get.sdkman.io" | bash Verify Installation Open a new terminal and execute sdk version List candidates sdk list List available version for a candidate sdk list java Install Java LTS versions sdk install java 21.0.4-jbr sdk install java 17.0.12-jbr sdk install java 11.0.14.1-jbr Set default Java version sdk default java 21.0.4-jbr Create alias in $HOME/.zprofile to switch jdk echo "alias jdk_21_use='sdk default java 21.0.4-jbr'" >> $HOME/.zprofile echo "alias jdk_17_use='sdk default java 17.0.12-jbr'" >> $HOME/.zprofile echo "alias jdk_11_use='sdk default java 11.0.14.1-jbr'" >> $HOME/.zprofile List current default version of a candidate sdk current java List currently installed versions of a java sdk list java | grep 'installed' Install Maven sdk install maven List currently installed version of maven or other candidates sdk list maven | grep '*'

Spring Boot - Debug Webflux reactive application in IDE

With Spring Boot Webflux reactive application, to debug and identify the unexpected exception thrown from a handler while handling http request, put a debug / break point in the following method of the class. This will quickly reveal the exception along with stacktrace with your favourite IDE Class: org.springframework.web.reactive.DispatcherHandler Method: handleRequestWith Have a breakpoint in the line after Mono<HandlerResult> resultMono = adapter.handle(exchange, handler)  and evaluate as  resultMono.block() Happy Debugging !!!

Spring Boot - Debug Web MVC application in IDE

With Spring Boot Web MVC application, to debug and identify the unexpected exception thrown from a controller while handling http request, put a debug / break point in the following method of the class. This will quickly reveal the exception along with stacktrace with your favourite IDE Class: org.springframework.web.servlet.DispatcherServlet Method: doService Have a breakpoint in the finally block and evaluate as request.getAttribute("org.springframework.boot.web.servlet.error.DefaultErrorAttributes.ERROR") Happy Debugging !!!

Spring Boot - Log generated SQL statement and query

To log and see the generated SQL statement and queries in Spring Boot application use the following properties in properties or yaml file. The properties allows to see the SQL from JPA (hibernate), JdbcTemplate (Core JDBC) and Liquibase layers of Spring Boot application. These settings adjust the logging level in logback for various layers in spring boot application. Using application.properties file logging.level.org.hibernate=TRACE logging.level.org.springframework.jdbc=TRACE logging.level.liquibase=TRACE Or using application.yml file logging : level : org : hibernate : TRACE springframework : jdbc : TRACE liquibase : TRACE