"Spring Boot Shi Zhanpai" study notes - Entrance Class Chapter 4 4.1.2 -Spring Boot's

Afternoon find time to study the project structure springboot now start learning the entry class springboot, the author of this book once again felt very comfortable ah directory architecture, people learn step by step, do not jump, very commendable.

springboot generated default class is constituted by an inlet and an annotation @SpringBootApplication a main method.

@SpringBootApplication
public class HelloWorldApplication {
         public static void main(String[] args) {
                   SpringApplication.run(HelloWorldApplication.class, args);
         }
}

Notes @SpringBootApplication, is used to mark the entrance class Boot Spring project.

"Main" method uses a static SpringApplication "run" method, and the type and parameter entry method "main" of "args" passed into the inlet to start classes.

Because this chapter is the basis of the authors here simply to explain the import category.

I also first recorded here, estimated that the authors also explain in advanced.

 

Guess you like

Origin www.cnblogs.com/yueyuea/p/11985566.html