How do you make sure some default code executes when the Spring boot applications starts up?
AnswerBot
1y
Use @PostConstruct annotation or implement CommandLineRunner interface
Use @PostConstruct annotation on a method that needs to be executed on startup
Implement CommandLineRunner interface and override r...read more
Help your peers!
Add answer anonymously...
Top Persistent Systems Java Technology Lead interview questions & answers
>
Persistent Systems Java Technology Lead Interview Questions
Stay ahead in your career. Get AmbitionBox app
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+
Reviews
4 L+
Interviews
4 Cr+
Salaries
1 Cr+
Users/Month
Contribute to help millions
Get AmbitionBox app