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
})
相关推荐
迷渡14 分钟前
用 Rust 重写的 Bun 有 13365 个 unsafe!
开发语言·后端·rust
九皇叔叔17 分钟前
高斯性能分析【第一天】单表执行计划分析
java·数据库·性能分析·执行计划·gauss
苦逼的猿宝19 分钟前
基于springboot的社区团购系统设计(源码+论文)
java·毕业设计·springboot·计算机毕业设计
AI_大白19 分钟前
DeepSeek Function Calling 接入实时行情:从工具定义到多轮查询的完整示例
后端·架构
电魂泡哥20 分钟前
RocketMQ Dledger 集群与 Raft 协议
java·rocketmq·java-rocketmq
行走的蜗牛28 分钟前
【springai】 Model层设计与实现
java·ai编程
杨运交29 分钟前
[021][数据模块]基于`BaseEnum`的统一枚举处理方案:序列化与 JPA 转换实践
spring boot
认真的薛薛31 分钟前
Linux基础:GitOps发布流程
java·linux·运维
鱼鳞_31 分钟前
苍穹外卖-Day05(Redis)
java·redis