xxxxxxxxxx
@SpringBootApplication
@RestController
public class DemoApplication {
@GetMapping("/helloworld")
public String hello() {
return"Hello World!";
}
}
xxxxxxxxxx
@SpringBootApplication
Defines as SpringBoot Application.
Includes:
@EnableAutoConfiguration
@ComponentScan
@Configuration
xxxxxxxxxx
Spring Boot @SpringBootApplication annotation is used to mark a configuration class that declares one or more @Bean methods and also triggers auto-configuration and component scanning
xxxxxxxxxx
@SpringBootConfiguration
@EnableAutoConfiguration
@ComponentScan
public @interface SpringBootApplication {