Springboot常用注解
1、@SpringBootApplication是一个复合注解,包含了@SpringBootConfiguration,@EnableAutoConfiguration,@ComponentScan这三个注解;
2、@SpringBootConfiguration继承自@Configuration,主要用于加载配置文件;
3、@EnableAutoConfiguration注解,开启自动配置功能;
4、@ComponentScan注解,主要用于组建扫描和自动装配;
本文深入解析SpringBoot中关键注解的功能与作用,包括@SpringBootApplication、@SpringBootConfiguration、@EnableAutoConfiguration和@ComponentScan,阐述了它们如何共同构建SpringBoot应用的基础。
1、@SpringBootApplication是一个复合注解,包含了@SpringBootConfiguration,@EnableAutoConfiguration,@ComponentScan这三个注解;
2、@SpringBootConfiguration继承自@Configuration,主要用于加载配置文件;
3、@EnableAutoConfiguration注解,开启自动配置功能;
4、@ComponentScan注解,主要用于组建扫描和自动装配;
1206

被折叠的 条评论
为什么被折叠?