SpringBoot 注解简介(持续更新)
虽然工作中交替会使用spring mvc 和spring boot 框架,但实际对spring中的很多注解并不是很了解,本篇将持续更新学习到的spring 注解。
Spring 主入口类上的注解
Spring boot项目中一般都会有这样的启动类:
@SpringBootApplication
@ServletComponentScan(basePackages = { "com.xxx.web.controller" })
@ComponentScan(value = { "com.xxx" })
@EnableAutoConfiguration(exclude = { Xxx.class })
@EnableConfigurationProperties
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}


