![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
springboot
BraveHeart!
freedom!
展开
-
springboot-自动配置原理
点进去,发现得到候选配置springboot在启动时候从类路径下的META-INF/spring.factories中获取EnableAutoConfiguration指定的值,将这些值作为自动配置类导入到容器中,自动配置类就生效,报我们进行自动配置工作;...原创 2019-05-14 10:25:03 · 191 阅读 · 1 评论 -
SpringBoot 使用WebJars统一管理静态资源
SpringBoot 使用WebJars统一管理静态资源转载 2019-05-22 15:43:48 · 177 阅读 · 0 评论 -
slf4j日志抽象层
原创 2019-05-20 16:43:02 · 305 阅读 · 0 评论 -
Profile多环境支持
Profile多环境支持转载 2019-05-20 16:15:10 · 95 阅读 · 0 评论 -
Spring Boot配置-properties文件编码问题
Spring Boot配置-properties文件编码问题转载 2019-05-20 16:11:37 · 1328 阅读 · 0 评论 -
Spring Boot读取properties配置文件中的数据
Spring Boot读取properties配置文件中的数据转载 2019-05-20 16:08:09 · 909 阅读 · 0 评论 -
Spring @Conditional注解 详细讲解及示例
Spring @Conditional注解 详细讲解及示例转载 2019-05-20 16:01:14 · 117 阅读 · 0 评论 -
springboot-导入Spring的配置文件
@ImportResource:导入Spring的配置文件,让配置文件里面的内容生效;Spring Boot里面没有Spring的配置文件,我们自己编写的配置文件,也不能自动识别; 想让Spring的配置文件生效,加载进来;@ImportResource标注在一个配置类上@ImportResource(locations={"classpath:beans.xml"}) 导入Spring的配...原创 2019-05-14 17:36:40 · 897 阅读 · 0 评论 -
SpringBoot@PropertySource不能解析yml和yaml文件的问题
原文地址:SpringBoot@PropertySource不能解析yml和yaml文件的问题@PropertySource 的注解中,有一个factory属性,可指定一个自定义的PropertySourceFactory接口实现,用于解析指定的文件。默认的实现是DefaultPropertySourceFactory,继续跟进,使用了PropertiesLoaderUtils.loadProp...转载 2019-05-14 17:19:49 · 2435 阅读 · 0 评论 -
springboot额外配置文件-@PropertySource
1.选择需要读取的额外配置文件(application.yml这个不需要)@PropertySource和@Value,如下图@Component@PropertySource("classpath:abc.properties")@ConfigurationProperties(prefix = "person")@Datapublic class Person { priva...原创 2019-05-14 17:10:29 · 650 阅读 · 0 评论 -
SpringBoot | 查看默认版本配置
<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.1.0.RELEASE</version>...原创 2019-05-13 16:37:02 · 5907 阅读 · 0 评论