@SpringBootApplication annotation is a convenience annotation introduced from Spring Boot 1.2.0. If you have worked on the earlier spring boot versions, it is common that main class always annotate with the following annotations: @Configuration : This annotation is not specific to the spring boot applications. This annotation tags the class as the source for bean definitions. …
Spring Framework
Ultimate Guide for Spring Boot DevTools
The main reason why Spring Boot is developed by Spring community is to simplify the packaging and deploying your spring applications to production. Keeping with that in mind, spring boot assumes all the default values loaded at startup is optimized for the production ready application. For example, caching of Thymeleaf templates are enabled by default which improves the performance in …
Caching Support in Spring Boot
This tutorial highlights the new features added as part of the spring boot 1.3.0 for caching support. Caching has been supported by spring boot, but there is no auto configuration option for the caching in spring boot until now. The new Spring Boot release 1.3.0 has introduced the following features that makes easier to use the caching within spring …
Spring Data Hopper Release
Last week spring data team lead Oliver Gierke has announced that Spring Data‘s next release train Spring Data Release Train Hopper M1 has been released. Spring Data has wide list of sub projects that are managed independently as a separate project. In order to have compatibility of each other, Spring Data team releases all the sub …
Spring and JSON Example
In this example I am going to explain how to get the JSON result in Spring Framework. One of my previous example about content negotiation talks about the same concept. But, here I want to re-visit the same topic with very simple example. Since Spring 3, we can get the JSON result out of the …
Difference Between Java Singleton and Spring Singleton
One of the common misunderstanding among Spring Framework developers is the difference between Spring Singleton and Java Singleton. Interestingly this turns out to be one of the popular interview questions for spring developers to check the understanding of singleton concepts. If you are working on Java and Spring technologies, it is quite important to know …
MySQL Configurations for Spring Boot Applications
In my previous articles for Spring Data JPA, I have used in-memory databases like H2 for persisting data. But, these in-memory databases can not be used for the production. These are only used for the development environment. In this post I will explain the basic configurations for setting up the MYSQL database for your Spring Data …
Using @NamedQuery in Spring Data JPA
In my previous article I have explained about how to use @Query annotation for writing the custom queries for Spring Data JPA applications. In this post, I will explain another type of writing the custom queries using @NamedQuery annotation that is part of the JPA specification. What is NamedQuery? There are two types of queries …