Posts

Showing posts with the label spring-boot-actuator

actuator /refresh is not being provided in SpringBoot 2.0.1

actuator /refresh is not being provided in SpringBoot 2.0.1 I am creating a demo project for Spring-Config-Server and Spring-Config-Client . Spring-Config-Server Spring-Config-Client In SpringBoot 1.5.6.RELEASE everything is working fine. SpringBoot 1.5.6.RELEASE However, when I am upgrading project to 2.0.1.RELEASE it does not provide the actuator endpoints. 2.0.1.RELEASE Actuator endpoint provided in 1.5.6.RELEASE Mapped "{[/refresh || /refresh.json],methods=[POST]}" Mapped "{[/dump || /dump.json],methods=[GET] Mapped "{[/heapdump || /heapdump.json],methods=[GET] Mapped "{[/autoconfig || /autoconfig.json],methods=[GET] Mapped "{[/resume || /resume.json],methods=[POST]}" Mapped "{[/configprops || /configprops.json],methods=[GET] Mapped "{[/features || /features.json],methods=[GET] Mapped "{[/loggers/{name:.*}],methods=[GET] Mapped "{[/restart || /restart.json],methods=[POST]}" ...and many more Actuator endpoint provided in...

Getting NullPointerException when tried to read @Autowired configuration object [duplicate]

Image
Getting NullPointerException when tried to read @Autowired configuration object [duplicate] This question already has an answer here: I am trying to read some properties from application.properties . I have created a configuration class with @Component and @ConfigurationProperties annotations. application.properties @Component @ConfigurationProperties When I am trying to access the configuration from a controller class, its working fine. But when I am trying to access the configuration from one component class, its throwing a null pointer exception. Following are the application.properties and classes. application.properties application.properties elasticsearch.ip=localhost InputManagementController.java @RestController public class InputManagementController { @Autowired private Configuration configuration; @GetMapping("/crawler/start") public String start(){ try{ System.out.println(configuration.getIp()); ----> getting value localhos...