[공부] Spring main 클래스(http://docs.spring.io/spring-boot/docs/current/reference/html/using-boot-structuring-your-code.html)에는  반드시 있어야할 Annotation이 있다.



출처 : http://docs.spring.io/spring-boot/docs/current/reference/html/using-boot-using-springbootapplication-annotation.html



1. @Configuration, @EnableAutoConfiguration, @ComponentScan  


2. @SpringBootApplication 

SpringBootApplication 소스는 다음과 같다. 1번을 다 포함시킨 것과 같다. 


@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
@Configuration
@EnableAutoConfiguration
@ComponentScan
public @interface SpringBootApplication {
Class<?>[] exclude() default {};
}



Posted by '김용환'
,