首页  

springboot最核心的三个注解     所属分类 springboot 浏览量 1063
@Configuration
@ComponentScan
@EnableAutoConfiguration

@SpringBootApplication 包含了以上 3 个注解

org.springframework.context.annotation.Configuration
org.springframework.context.annotation.ComponentScan
org.springframework.boot.autoconfigure.EnableAutoConfiguration



@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
@SpringBootConfiguration
@EnableAutoConfiguration
@ComponentScan(excludeFilters = {
		@Filter(type = FilterType.CUSTOM, classes = TypeExcludeFilter.class),
		@Filter(type = FilterType.CUSTOM, classes = AutoConfigurationExcludeFilter.class) })
public @interface SpringBootApplication {


其他
@Bean
@ImportResource
@SpringBootConfiguration

上一篇     下一篇
MongoDB面试题

MongoDB优缺点

延迟任务处理总结

springboot面试题

springboot自动配置原理和实例

ConcurrentHashMap使用注意点