Spring Boot Programming Tips


How to Send Email From Spring Boot Applications

Spring framework provides a number of library classes for sending email. It provides an easy to use mail interface called JavaMailSender built on top of the JavaMail API. JavaMail API is a messaging framework available as part of Java SE and Java EE platforms. Spring boot provides a starter project and auto configuration for JavaMailSender […]

Using Log4J2 with Spring Boot

Spring boot starter projects enable quick development boot applications.  Starter projects has a default dependency on spring-boot-starter-logging. This library configures logback as the default logging implementation. However some may prefer to use log4J2 instead of Logback to write application logs. Both works with the SLF4J facade API and hence it is possible to switch from […]

JDK Logging (JUL) in Spring Boot Applications

When writing spring boot applications, it is recommended to use SLF4J API for logging. However it is also possible to use the logging implementation provided by JDK directly. However JDK logging implementation (JUL) provides a different set of logging levels compared to SLF4J or Log4J. The logging levels used by JDK library are, FINEST > […]

How to Enable Color in Spring Boot Console Log

Spring boot supports color coding of logging output displayed on the console. This enables us to quickly identify any errors or warnings logged by spring boot system. On most systems color coding works automatically. However if you are using a Mac terminal, you will find that no color coding is applied to the spring boot […]

What is New in Spring Boot 2.0

Spring Boot 2 is a major upcoming release (scheduled for November 2017) with a number of dependency upgrades. Spring boot requires a more recent version of the following tools and frameworks. Spring Boot 2 requires spring framework 5 or above. Spring framework 5 now requires Java 8 and Java EE 7 API. It also has […]