Spring Boot MVC and Hibernate CRUD Example

Introduction In this tutorial we will create an example on Spring Boot MVC and Hibernate CRUD. CRUD is an acronym that means Create, Read, Update and Delete operations. In my other tutorial I had also created Spring Boot MVC and JDBC CRUD Example. We will build the tutorial example using both maven and gradle build tools. We will create the…

Spring Boot MVC And JDBC CRUD Example

Spring JDBC CRUD In my another tutorial I had shown how to create an example on Spring MVC and JDBC CRUD example using annotations only, but here I am going to use Spring Boot framework. I did not update the other tutorial keeping in mind if someone still needs the example using Spring framework only. Here also I am going…

How to create Datasource in Spring Boot application

In this tutorial we will see how to create Datasource in Spring Boot application in different ways. We need to create datasource in our applicationin order to interact with database and perform database operations in Spring or Spring Boot applications. You can use database vendor as per your project’s requirement but the underlying concept is same for creating the Datasource….

@WebMvcTest Annotation Example in Spring MVC Applications

Introduction We will see the use of @WebMvcTest annotation in Spring MVC applications. The Spring MVC application may be Spring Boot application as well. The @WebMvcTest annotation can be used not only to test Spring Controllers but also Spring REST Controllers. We will build the applications using both maven and gradle tools. @WebMvcTest annotation is used for unit testing of…

Spring Integration – Manipulate RSS Feed Data and Write to Files

Introduction In this tutorial we will create an example on how to manipulate data from RSS Feed and write to files periodically using Spring Integration framework. This guide uses Spring Integration using Java configuration to retrieve data from RSS feed, manipulate and write to files. In this example we will create both gradle and maven based build configurations to build…

Spring Boot Security Angular Login Logout Example

Angular Spring Security Here I will create Spring Boot Security Angular Login Logout Example which will show you how to integrate Spring Security with Angular to login to the application. I will redirect user to the login page if user is not already logged in. Similarly I will redirect user to the home page if user is already logged in….

Form Validation in Spring Boot Web Application

Introduction In this example we will see an example on how to validate form in web application using Spring Boot framework. We will use Thymeleaf as a template for UI (user interface) or front-end. We will perform almost all kinds of validations available through Hibernate validator framework. This example just validates the input values and once validated successfully it just…

How to reload Changes on Spring Boot without Server Restart

Introduction Situations may occur when you need to speed up your development works without having to worry about restarting the server for every change in the piece of code in your application. Spring Boot provides such provision using which you can easily achieve the goal. Applications that use spring-boot-devtools will automatically restart whenever files on the classpath change. This can…

How to log with Lombok using @slf4j annotation in Java, Spring and Spring Boot Applications

Introduction In this tutorial I will show you how to configure Lombok for logging using @slf4j annotation in Java, Spring and Spring Boot applications. The example shown here will work for Java, Spring and Spring Boot applications. This annotation will reduce the code you write for creating logger variable. Lombok will provide log variable when you use @slf4j annotation on…

Spring Module-Wise Logs Using MDC In Logback

SiftingAppender And MDC In this example you will see how to create or generate separate log file module-wise or for each separate functionality using SiftingAppender in logback with the help of ThreadedContext or MDC in Spring Boot applications. MDC also known as Mapped Diagnostic Context is a lighter technique consists of uniquely stamping each log request servicing a given client….