일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
- vanilla js image slider
- equals
- c++ 빌드
- Java Wrapper Class
- kotest
- java 비동기처리
- SpringBootApplication
- equals override
- hashcode override
- 코드포스
- java CompletableFuture
- github action
- javascript image slider
- image slider
- Java
- github action codedeploy
- Java lombok
- java stream api
- github CI
- github CI/CD
- stream groupingby
- AWS Codedeploy
- java hashCode
- github ec2 deploy
- Spring Aspect
- AliasFor
- list remove
- lombok Builder
- Github action deploy
- github deploy
- Today
- Total
기록창고
@SpringBootApplication 본문
Many Spring Boot developers like their apps to use auto-configuration, component scan and be able to define extra configuration on their "application class". A single @SpringBootApplication annotation can be used to enable those three features, that is:
- @EnableAutoConfiguration: enable Spring Boot’s auto-configuration mechanism
- @ComponentScan: enable @Component scan on the package where the application is located (see the best practices)
- @Configuration: allow to register extra beans in the context or import additional configuration classes
The @SpringBootApplication annotation is equivalent to using @Configuration, @EnableAutoConfiguration, and @ComponentScan with their default attributes, as shown in the following example:
package com.example.myapplication;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication // same as @Configuration @EnableAutoConfiguration @ComponentScan
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
세줄요약 :
@EnableAutoCongiruation
@ComponentScan
@Configuration 을 합쳐놓은거다
18. Using the @SpringBootApplication Annotation
18. Using the @SpringBootApplication Annotation Many Spring Boot developers like their apps to use auto-configuration, component scan and be able to define extra configuration on their "application class". A single @SpringBootApplication annotation can be
docs.spring.io
'Spring' 카테고리의 다른 글
@Controller, @Service 의 차이? (@Aliasfor) (0) | 2020.07.01 |
---|---|
중복된 로직이 있다면 어떻게해야될까? AOP (0) | 2020.06.18 |