xxxxxxxxxx
Spring boot offers several ways of running Spring boot applications.
I would like to suggest five ways we can run Spring Boot Application
Running from an IDE
Running as a Packaged Application
Using the Maven Plugin
Using External Tomcat
Using the Gradle Plugin
xxxxxxxxxx
Different ways to create Spring boot project:
1. Using Spring Initializr - Create a Spring boot project using Spring Initializr and import in any IDE - Eclipse STS, Eclipse, IntelliJ idea, VSCode, Netbeans
2. Using Spring Starter Project in STS (Eclipse) - You can directly create a Spring boot project in STS using the Spring Starter Project option.
3. Spring Boot CLI - The Spring Boot CLI is a command-line tool that you can use if you want to quickly develop a Spring application.
xxxxxxxxxx
@SpringBootApplication
public class MyApplication {
public static void main(String[] args) {
SpringApplication.run(MyApplication.class);
// other statements
}
}