I have a cache class that is loading properties from a .properties file before the application startup, in a simple java project. It logs out everything.I need to convert this project to springboot application.
What annotations can i use to achieve the Cache Loading??
Currently I wrote the code like my spring boot app starts with the @postconstruct , since i am not using web.xml for loading servlets.
@RestController
public class ConfigServlet {
@PostConstruct
public void init() {
//business logic
}
}
And this servlet starts up first. So how can i load cache along this??
It is supposed to load the Cache even before this servlet class loads. How can i achieve this concept??