springboot常见注解

一、@SpringBootApplication:

1、介绍:这是一个组合注解:包含了

复制代码
@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}
)}
)

SpringBootApplication注解等价于以默认属性使用@Configuration、@EnableAutoConfiguration和@ComponentScan。

2、禁用自动装配项:

复制代码
@SpringBootApplication(exclude = {
		DataSourceAutoConfiguration.class,
		SecurityAutoConfiguration.class
})
相关推荐
MetWeave几秒前
从零跑一个气象数据管道:抓取、清洗、对账、节奏
后端·python
萧瑟余晖几秒前
Spring Security综合实战与安全加固详解
java·安全·spring
gopher951113 分钟前
RUST:序列化与反序列化 serde + derive 详解
开发语言·后端·rust
铁皮饭盒14 分钟前
CPU就行, 老照片变清晰, 本地部署582mb腾讯的模型, 本地部署, 过节了给长辈们变个小魔术
前端·javascript·后端
imDwAaY15 分钟前
操作系统如何管理程序运行?从线程、进程到内存隔离与用户态切换:CS162 Note2
android·java·redis
const_qiu20 分钟前
第三章 08:3.10 本章小结
java·人工智能
Pniubi20 分钟前
快速排序(力扣基础)(递归)
java·数据结构·算法
CarIise38 分钟前
Spring MVC 请求参数绑定与常用注解2
java·spring·mvc
七夜zippoe1 小时前
Spring Boot 接通义千问:从拿 Key 到第一个对话接口跑通(保姆级)
java·spring boot·后端
SimonKing1 小时前
别再花钱调 OCR 接口了!这个国产开源工具,免费还能离线跑
java·后端·程序员