pring provides actuators that are a helpful set of tools to debug the application on runtime. Here is how to enable them. We first add actuator dependency in the pom.xml
<dependency> <groupid>org.springframework.boot</groupid>…
Many times it is a practical requirement to have multiple databases for a single application. These databases could be at different locations on the cloud and different entities in your application may be dealing with these databases.Multi-tenancy is a…
Many times we have a need to return data from an endpoint based on the role. Spring framework provider easy mechanism for us to be able to do that. Let’s take an example. In the previous example, we want to add a GET method in UserEndpoint that returns all the users. For any safe…
Before we proceed any further, let’s enable swagger on our service so that testing it becomes easy. The first step is to add…
By default when we run spring boot application, it runs a tomcat server. I have personally found tomcat too heavyweight and I prefer to use Jetty for writing a webservices backend.
2018-12-19 10:54:08.403 INFO 16029 --- [ main]…