Spring Boot Actuator

Actuators are nothing but Spring Boot provided production-ready features to our application. Spring Boot includes a number of additional features to help you monitor and manage your application when you push it to production. You can choose to manage and monitor your application by using HTTP endpoints. Monitoring of application, gathering metrics, understanding traffic becomes trivial with this dependency. The main benefit is actually getting … Continue reading Spring Boot Actuator

@ComponentScan vs @EntityScan

@ComponentScan is used for scanning all your components those are marked as @Controller, @Service, @Repository, @Component etc… where @EntityScan is used to scan all your Entities those are marked @Entity for any configured JPA in your application. @ComponentScan: Configures component scanning directives for use with @Configuration classes. It is as same as writing Spring XML’s <context:component-scan> element. The  value()  attribute may be specified to define specific packages to scan. … Continue reading @ComponentScan vs @EntityScan

@RestController vs @Controller

Both are used to turn any public class into Spring MVC controllers which will be the entry point of any Spring MVC application. Or we can also say that -> @RestController = @Controller + @ResponseBody; Let me explain the above equation in detail. @RestController are used to make PURE REST API Controllers in Spring who’s returned data (JSON or XML) is used by different views … Continue reading @RestController vs @Controller