Complete the code to start the Spring Boot application.
public static void main(String[] args) {
SpringApplication.[1](MyApplication.class, args);
}The SpringApplication.run() method starts the Spring Boot application.
Complete the annotation to mark the main class as a Spring Boot application.
@[1] public class MyApplication { // main method here }
The @SpringBootApplication annotation marks the main class as the entry point for Spring Boot.
Fix the error in the main method to correctly start the application.
public static void main(String[] args) {
SpringApplication.[1];
}The run method requires the application class and arguments to start properly.
Fill both blanks to create a Spring Boot application main class with the correct annotation and main method call.
@[1] public class MyApplication { public static void main(String[] args) { SpringApplication.[2](MyApplication.class, args); } }
The main class must be annotated with @SpringBootApplication and start with SpringApplication.run().
Fill all three blanks to create a Spring Boot main class with annotation, main method, and run call.
@[1] public class [2] { public static void main(String[] args) { SpringApplication.[3]([2].class, args); } }
The class is annotated with @SpringBootApplication, named MyApplication, and started with SpringApplication.run().