Spring boot学习笔记之@SpringBootApplication注解
2024-08-21 07:06:22
@SpringBootApplication(exclude = SessionAutoConfiguration.class)
public class BootReactApplication {
public static void main(String[] args) {
SpringApplication.run(BootReactApplication.class, args);
}
}
点进去后可以看到有关的源码,可以看到下面的注解
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
@Configuration
@EnableAutoConfiguration
@ComponentScan
其中最重要的是下面三个注解:
@Configuration:表示将该类作用springboot配置文件类。
@EnableAutoConfiguration:表示程序启动时,自动加载springboot默认的配置。
@ComponentScan:表示程序启动是,自动扫描当前包及子包下所有类。
最新文章
- 获取使用ClickOnce部署的应用程序的版本号
- ajax请求成功后新窗口window.open()被拦截的解决方法
- Qt之C语言类型typedef a[]等
- 实战p12文件转pem文件
- IntelliJ_13书签
- 【BZOJ-2436】嘉年华 DP + 优化
- 从客户端中检测到有潜在危险的Request.Form值的解决方法
- Java构造器和方法的区别
- Hbase深入学习(一) 什么是hbase
- ShellExecute快捷键大全
- 在项目中创建单元测试时junit的配置和使用
- Linux中执行C++程序
- vue 渲染函数&;jsx
- Cropper.js使用笔记
- hadoop 安装过程记录
- redis 3.2.1 centos7
- ReSharper 10.0.0.1 Ultimate 完美破解补丁使用方法
- SPRINT四则运算(第二天)
- PYTHON-匿名函数,递归与二分法,面向过程编程-练习
- 【转】Django中使用POST方法获取POST数据
热门文章
- Day 4-8 hashlib加密模块
- Linux安装mysql5.6
- RedHat 安装RabbitMQ
- 在编写wpf界面时候中出现如下错误: 类型引用不明确。至少有两个名称空间(“System.Windows”和“System.Windows”)中已出现名为“VisualStateManager”的类型。请考虑调整程序集 XmlnsDefinition 特性。
- List接口方法
- How to write to an event log by using Visual C#
- css中绝对定位和相对定位详解
- C语言itoa()函数和atoi()函数
- Spring 使用介绍(十一)—— Spring事件
- python 模块之-shelve