Qtr No. 213, New Town Yehlanka Indore 454775
Spring Boot Runners are used to execute a set of code immediately after an application has started. Which of the below are the correct ways for implementing of the Spring Boot Runners? [Choose two]
@SpringBootApplication public class DemoSpringBootApplication implements CommandLineRunner { public static void main(String[] args) { SpringApplication.run(DemoSpringBootApplication.class, args); } @Override public void run(String... args) throws Exception { //code for executing the desired actions to be performed when the application starts } }
@SpringBootApplication public class DemoSpringBootApplication implements ApplicationRunner { public static void main(String[] args) { SpringApplication.run(DemoSpringBootApplication.class, args); } @Override public void run(ApplicationArguments args) throws Exception { //code for executing the desired actions to be performed when the application starts } }
@SpringBootApplication public class DemoSpringBootApplication implements CommandLineRunner { public static void main(String[] args) { SpringApplication.run(DemoSpringBootApplication.class, args); } @Override public void run(ApplicationArguments args) throws Exception { //code for executing the desired actions to be performed when the application starts } }
@SpringBootApplication public class DemoSpringBootApplication implements ApplicationRunner { public static void main(String[] args) { SpringApplication.run(DemoSpringBootApplication.class, args); } @Override public void run(String... args) throws Exception { //code for executing the desired actions to be performed when the application starts } }
To get all Infosys Certified Spring Boot Developer Exam questions Join Group https://bit.ly/infy_premium_group
We're passionate about offering best placement materials and courses!! A one stop place for Placement Materials. We daily post Offcampus updates and Placement Materials.
Qtr No. 213, New Town Yehlanka Indore 454775
admin@prepflix.in