可以追一下代码,看一下这个注解的源码,其实很简单,就是几个组合注解,那几个呢?

  1. @SpringBootConfiguration:SpringBoot的配置类
  2. @EnableAutoConfiguration: 开启自动化配置(Spring ,Spring MVC那套配置都有了)
  3. @ComponentScan:包扫描(扫描启动类所在的包里面的所有东西)

 

相关文章:

  • 2021-12-04
  • 2021-12-19
  • 2021-11-17
  • 2021-11-19
  • 2021-12-02
  • 2021-12-08
  • 2021-08-01
  • 2022-01-22
猜你喜欢
  • 2022-12-23
  • 2022-01-14
  • 2021-10-01
  • 2021-05-07
  • 2021-12-24
  • 2021-05-22
  • 2022-12-23
相关资源
相似解决方案