Session Tracking modes in Spring security

Applications maintain their state with the user using a concept called session. In this post we will see about different type of session tracking modes and how they work. When an application authenticates a user, it can do two possible things. Forget about the user after the request is processed and user will have to authenticate for each…

Custom Form Login in Spring Security

The default form login that you have seen in my previous post may not fit everyone’s need. For example, Some organization may want to put a logo on their login page. Some may find the default login forms less appealing. For some perfectionists, The default password may not seem to fit the theme of the whole application….

Form Login with Spring Boot

This article concentrates on the default form login implementation from Spring Boot and Spring Security. Let’s dive in to understand spring security with form based username and password login. To start with, I have written a simple web application with an API that prints hello world. There is nothing special about this Controller. When we…

Spring Security

What is Spring Security? It is a powerful and highly customizable authentication and access-control(RBAC) framework. It is the standard for securing Spring-based web applications. This framework focuses on providing both authentication and authorization to Java applications. Similar to other modules, You can easily extend the Spring Security module to meet custom requirements. Features Here are…

Spring Boot Redis Cache – Complete Guide

Let’s learn how to use redis cache to increase Spring Boot application performance with simple steps. Previously, We discussed how to enable simple caching implementation. But, there were few drawbacks to in-memory caching. This is where the Redis cache store comes into the picture. Introduction Redis is a high performance datastore with high throughput. This…

Spring Cache abstraction

Let’s learn how to implement cache mechanisms in Spring Boot using @Cacheable annotation with an example. Introduction to caching Caching is a concept that improves response time by storing copies of most frequently used data on a temporary but fast storage. In this article, We will see how to enable caching for a spring boot…

Command Line Runner with Spring Boot

Command Line runners are short-lived applications that die after the work is done. In this post we will see how to use CommandLineRunner to access the command line arguments in a spring boot application. Typical Java Implementation Let’s take a small example in pure java. The above class is an example of a command line application. The…

Spring Boot Banner – Complete Guide

In this post, We will learn how to customize startup banner of a spring Boot application. Also, we will understand how we can use an image or gif file as a startup banner. Take a look at our Hello World Application. As you see, the default at the spring boot startup banner looks like below….

RESTful JPA Repositories with Spring Boot

In this post we will see how to create restful endpoints from JPA Repositories in a Spring Boot application. Introduction In the HATEOAS implementation tutorial, we pretty much save and retrieve data from the database. But there is too much boilerplate code for just managing the data(Controller methods). In situations like these, Spring Data REST comes…

Startup Actuator Endpoint in Spring Boot

In this post we will learn more about new Startup Actuator endpoint and how we can use it to optimize the startup time of Spring Boot applications. Spring Boot startup sequence is a complex process. We can speed the Spring Boot application startup by tracking the application startup events. Till now we didn’t have an…