springboot基础(随笔)
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>2.1.6.RELEASE</version>
<relativePath>../../spring-boot-dependencies</relativePath>
</parent>
springboot 的版本管理器
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-*</artifactId>
</dependency>
springboot的启动器,可以帮助导入相关的依赖
@SpringBootApplication //springboot的主程序注解
//该注解又由以下注解构成
@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 {
@SpringBootConfiguration //这是一个springboot的配置类
@configuration //配置类也是容器中的一个组件
@EnableAutoConfiguration //开启自动配置
//该注解内有以下注解 @AutoConfigurationPackage //将主配置类下的所有的包都扫描到容器中
@Import(AutoConfigurationImportSelector.class)
@AutoConfigurationPackage //自动配置包
@Import(AutoConfigurationPackages.Registrar.class)
spring中底层的注解@Import,给容器中导入一个组件
springboot基础(随笔)的更多相关文章
- (二)SpringBoot基础篇- 静态资源的访问及Thymeleaf模板引擎的使用
一.描述 在应用系统开发的过程中,不可避免的需要使用静态资源(浏览器看的懂,他可以有变量,例:HTML页面,css样式文件,文本,属性文件,图片等): 并且SpringBoot内置了Thymeleaf ...
- SpringBoot基础系列一
SpringBoot基础知识概览 特性 核心理念:约定优于配置 特点: 1. 开箱即用,根据项目依赖自动配置 2. 功能强大的服务体系,如嵌入式服务.安全 3. 绝无代码生成,不用写.xml配置,用注 ...
- SpringBoot基础系列-SpringCache使用
原创文章,转载请标注出处:<SpringBoot基础系列-SpringCache使用> 一.概述 SpringCache本身是一个缓存体系的抽象实现,并没有具体的缓存能力,要使用Sprin ...
- SpringBoot基础系列-使用日志
原创作品,可以转载,但是请标注出处地址:https://www.cnblogs.com/V1haoge/p/9996897.html SpringBoot基础系列-使用日志 概述 SpringBoot ...
- SpringBoot基础系列-使用Profiles
原创作品,可以转载,但是请标注出处地址:https://www.cnblogs.com/V1haoge/p/9996884.html SpringBoot基础系列-使用Profile 概述 Profi ...
- SpringBoot基础系列-SpringBoot配置
原创作品,可以转载,但是请标注出处地址:https://www.cnblogs.com/V1haoge/p/9990680.html SpringBoot基础系列-SpringBoot配置 概述 属性 ...
- SpringBoot 基础01
SpringBoot 基础 pom.xml <!-- Spring Boot 依赖版本控制 --> <parent> <groupId>org.springfram ...
- springBoot基础2
主要记录上一篇 springBoot基础 中涉及到的pom.项目结构.注解等 首先是pom: 关于pom中这段插件配置: <plugin> <groupId>org.sprin ...
- springBoot基础
开始之前最基础的东东here 官网:http://projects.spring.io/spring-boot/ 基础快速构建:http://start.spring.io/ 松哥的博客:http:/ ...
- 视频作品《springboot基础篇》上线了
1.场景描述 第一个视频作品出炉了,<springboot基础篇>上线了,有需要的朋友可以直接点击链接观看.(如需购买,请通过本文链接购买) 2. 课程内容 课程地址:https://ed ...
随机推荐
- 当一个控件属性不存在的时候,IDE会出错在这里(说明是TWinControl.ReadState在读属性,并执行相关动作)
procedure TWinControl.ReadState(Reader: TReader); begin DisableAlign; try inherited ReadState(Reader ...
- Python魔法方法__getattr__和__getattribute__详解
在Python中有这两个魔法方法容易让人混淆:__getattr__和getattribute.通常我们会定义__getattr__而从来不会定义getattribute,下面我们来看看这两个的区别. ...
- 基于 Kong 和 Kubernetes 的 WebApi 多版本解决方案
前言 大家好,很久没有写博客了,最近半年也是比较的忙,所以给关注我的粉丝们道个歉.去年和朱永光大哥聊的时候提了一下我们的这个方案,他说让我有空写篇博客讲一下,之前是非常的忙,所以这次趁着有些时间就写一 ...
- Dynamics 365 Document Management
Dynamics CRM中的Document Management功能需要Dynamics CRM与SharePoint进行集成,也就是实现在CRM中上传Document,实际上Document最终存 ...
- 阿里云ssl证书NGINX配置https,wss
server { listen 443; server_name server.sentiger.com; ssl on; root /home/wwwroot/Service/beta/public ...
- Linux五种IO模型 ——Java学习笔记
本文摘自网络: 1.阻塞IO(blocking IO) 在linux中,默认情况下所有的socket都是blocking,一个典型的读操作流程大概是这样: 图1 阻塞IO 当用户进程调用了re ...
- Hadoop起步之图解SSH、免密登录原理和实现
1. 前言 emmm….最近学习大数据,需要搭建Hadoop框架,当弄好linux系统之后,第一件事就是SSH免密登录的设置.对于SSH,我觉得使用过linux系统的程序员应该并不陌生.可是吧,用起来 ...
- CPP常用库函数以及STL
其他操作 memset void * memset ( void * ptr, int value, size_t num ); memset(ptr,0xff,sizeof(ptr)); 使用mem ...
- Apache配置URL重定向
Apache配置URL重定向 修改/etc/httpd/conf/httpd.conf文件的内容 <Directory "/var/www"> AllowOverrid ...
- mysql远程连接设置
mysql远程连接设置只需要把mysql数据库的user表中的localhost改成%就可以远程连接了. 值得提醒的是:开发阶段可以打开,生产的时候尽量关闭,因为本人就遇到别人通过这个把我数据库给删的 ...
