1.@SpringBootApplication: 等价于同时使用@Configuration @EnableAutoConfiguration @ComponentScan
spring boot中使用@SpringBootApplication指定类为应用启动类,
自动扫描于当前类同级以及子包下的相应注解注册为spring beans,
在类中main方法中通过SpringApplication的run方法启动应用。
详情参考:https://blog.youkuaiyun.com/yhl_jxy/article/details/72599063
2.@ServletComponentScan
在 SpringBootApplication 上使用@ServletComponentScan 注解后,Servlet、Filter、Listener 可以直接通过 @WebServlet、@WebFilter、@WebListener 注解自动注册,无需其他代码
详情参考:https://blog.youkuaiyun.com/catoop/article/details/50501686
3.@EnableScheduling
定时任务在配置类上添加@EnableScheduling开启对定时任务的支持,在相应的方法上添加@Scheduled声明需要执行的定时任务。
详情参考:https://blog.youkuaiyun.com/u014231523/article/details/76263304?locationNum=7&fps=1
4.@EnableTransactionManagement
使用注解 @EnableTransactionManagement 开启事务支持后,然后在访问数据库的Service方法上添加注解 @Transactional 便可。
5.@EnableFeignClients
当前service服务要调用到其他service服务的api接口时,可通过EnableFeignClients调用其他服务的api
详情参考:https://www.cnblogs.com/UniqueColor/p/7130782.html
6.@EnableDiscoveryClient
把服务注册到Eureka Server
详情参考:https://my.oschina.net/eacdy/blog/1609308
7.@MapperScan
通过使用@MapperScan可以指定要扫描的Mapper类的包的路径
详情参考:https://blog.youkuaiyun.com/u013059432/article/details/80239075
8.@ComponentScan
定义扫描的路径从中找出标识了需要装配的类自动装配到spring的bean容器中
详情参考:http://blog.51cto.com/4247649/2118342
9.@EnableAutoConfiguration
@EnableAutoConfiguration
可以帮助SpringBoot应用将所有符合条件的@Configuration
配置都加载到当前SpringBoot创建并使用的IoC容器
详情参考:https://blog.youkuaiyun.com/zxc123e/article/details/80222967