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 …
Builder Design Pattern
In this tutorial I am going to explain about builder design pattern, this is one of the most widely used design pattern in Java. Builder design pattern comes under the creational design pattern since builder design pattern helps in creating an object using step-by-step approach. Subscribe to our future updates. Builder design pattern solves the problem …
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 …
@Query Annotation in Spring Data JPA
In my previous post on Spring Data, I have explained the basic concepts and configurations for Spring Data JPA. In this tutorial, I am going to explain @Query annotation and how to create custom query using the @Query annotation. The greatest advantage of using Spring Data is that it implements the repositories at run time …
How to Solve QuerySyntaxException in Hibernate?
If you are working on hibernate, getting QuerySyntaxException is very common if there is any issue with the query which you are trying to execute in your code. This QuerySyntaxException is more generic and it would throw different types of error messages based on the issue with the query. In this post I would update my experience …
Spring Security Tutorial using Spring Boot
In our earlier posts, we have written about Spring Security 3.0, Spring Security Login Example and How to get current username in spring security?. Those are quite old posts and there is lot of changes in the latest version of spring security. Another reason for this post is to write most comprehensive tutorial on spring security that …
Ehcache Example
Ehcache is most widely used Java open source cache implementation. The great advantage of this cache is that it easily integrates with any other libraries. In this tutorial I will write very basic example using the Ehcache library. The latest version: The latest version of ehcache is 2.10.1. You can download the latest distributations of …