Author Archive


Spring 4 Hello World Example With Java Configuration

Spring framework is a lightweight, modular and non-invasive application framework for building java applications. Older versions of spring framework required verbose XML files for configuring java beans. Since spring 3.0, bean configuration can be specified in java code itself and is commonly know as java config(java configuration). Now it is possible to build a full […]

How to Write a Minimal Spring Application

Spring framework and spring boot are very popular these days for building enterprise java applications. Over years spring framework ecosystem has grown considerably. Almost all infrastructural component needs are now provided by spring framework. Spring boot simplifies development further by providing a set of defaults and automatic configuration. Under the hood, spring framework is powered […]

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 > […]