December 6, 2023

Spring Boot Microservices – Spring Boot JPA Auditing with AuditorAware Interface

In Spring Boot JPA Auditing Example, we will look at how Spring Data JPA helps managing audit information. Using the AuditorAware Interface, Spring Data JPA provides mechanism for capturing audit information. Such a functionality is quite important while building Spring Boot Microservices for production usage. Basically, Spring Data JPA Auditing automatically captures last updated and created timestamps. It can also tie up with Spring Security to track the user details.

Spring Boot Microservices – Spring Boot JPA Auditing with AuditorAware Interface Read More

Spring Boot Microservices – Setting up Hibernate Envers with Spring Boot

Hibernate Envers is a module that implements auditing and versioning of persistent entities. Auditing and versioning is a key component for building production-level Spring Boot Microservices. Hibernate Envers integrates seamlessly with Spring Boot to achieve the same. In this post, we will integrate Hibernate Envers in our Spring Boot Starter application.

Spring Boot Microservices – Setting up Hibernate Envers with Spring Boot Read More

Spring Boot Microservices – Advanced Swagger Configuration with Spring Boot

In the previous post Setting up Swagger with Spring Boot Application, we looked at the process of setting up Swagger with Spring Boot. However, there are other configuration options available that we can take advantage of to improve our API documentation. Good Swagger Documentation is an essential ingredient of building good Spring Boot Microservices. In this post, we will look at advanced swagger configuration with Spring Boot.

Spring Boot Microservices – Advanced Swagger Configuration with Spring Boot Read More

Spring Boot Microservices – Setting up Swagger with Spring Boot Application

In the previous post Handling Validations in Spring Boot Application, we added validations to our application. With that, we brought it quite close to a production-level application. However, one of the important aspects of any application is documentation. In the context of REST API, documentation becomes even more important. A good documentation can increase the adoption of an API. A bad one can only lead to unpopularity. In this post, we will look at setting up Swagger with Spring Boot Application and see it in action.

Spring Boot Microservices – Setting up Swagger with Spring Boot Application Read More

Spring Boot Microservices – Handling Validations in Spring Boot Application

We already looked at exception handling in a Spring Boot application. The other side of the coin is to validate the incoming data to our application. Lack of validation can lead to bad data in your database. In other words, it can adversely impact downstream processes, business insights and the overall functioning of your application negatively. The key to building a robust Spring Boot microservice is to validate the incoming data. In this post, we are going to look at the process of handling validations in Spring Boot application.

Spring Boot Microservices – Handling Validations in Spring Boot Application Read More

Spring Boot Microservices – Exception Handling in a Spring Boot application

Exception Handling is one of the most important aspects of a production-level Spring Boot Microservice. In the last post Creating REST API using Spring Boot, we had added the functionality to read, create and update records using our application. However, our application was not very robust. In this post, we will look at exception handling in a Spring Boot application.

Spring Boot Microservices – Exception Handling in a Spring Boot application Read More

Spring Boot Microservices – Creating REST API using Spring Boot

In the post Exposing repositories as REST resources, we exposed a repository as a RESTful interface using Spring Data REST. However, that’s not the conventional way of creating REST API for Spring Boot Microservices. That particular approach works best if your data model is exactly similar to your domain model. Usually, that’s not the case. In this post, we will look at the right way of creating REST API using Spring Boot.

Spring Boot Microservices – Creating REST API using Spring Boot Read More

Spring Boot Microservices – Exposing repositories as REST resources

For any application, it is an important functionality to be able to provide its data to the consumer. REST APIs are one of the most popular ways to do so. In this post, we will look at the process of exposing repositories as REST resources using Spring Boot. REST or Representational State Transfer is an architectural style that advocates the use of standard HTTP protocol to expose such an interface. And by the way, Spring Boot makes it very easy to do so.

Spring Boot Microservices – Exposing repositories as REST resources Read More

Spring Boot Microservices – Setting up Spring Boot H2 Database

Spring Boot H2 Database is an extremely useful tool in the arsenal of any developer working on a Spring Boot application. The Spring Boot H2 database can be embedded within a Java application or could also be run in client-server mode. It is also very useful during development phase for iterating through schema changes without worrying about making changes to the actual database such as MySQL or PostgreSQL. In this post, we will first learn the process of setting up Spring Boot H2 database.

Spring Boot Microservices – Setting up Spring Boot H2 Database Read More