摘要: spring-boot-starter-test提供了很多注解用于测试,接下来我们就一一介绍。 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifac 阅读全文
posted @ 2020-12-01 13:23 codedot 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 官方文档:https://docs.spring.io/spring-boot/docs/2.3.6.RELEASE/reference/htmlsingle/#boot-features-external-config-application-property-files 一、springboot 阅读全文
posted @ 2020-12-01 13:19 codedot 阅读(1171) 评论(0) 推荐(0) 编辑
摘要: Spring读取配置文件的几种方法,SpringBoot也都支持。具体查看:https://www.cnblogs.com/myitnews/p/14028588.html 本文主要介绍SpringBoot独有的一种读取方法,使用注解:@ConfigurationProperties。 使用 @Va 阅读全文
posted @ 2020-12-01 13:18 codedot 阅读(4146) 评论(0) 推荐(1) 编辑
摘要: 一、SpringBoot starter机制 SpringBoot中的starter是一种非常重要的机制,能够抛弃以前繁杂的配置,将其统一集成进starter,应用者只需要在maven中引入starter依赖,SpringBoot就能自动扫描到要加载的信息并启动相应的默认配置。starter让我们摆 阅读全文
posted @ 2020-12-01 09:10 codedot 阅读(443) 评论(0) 推荐(0) 编辑
摘要: starter名称 starter描述 starter依赖项 spring-boot-starter 核心启动器,包含了自动配置、日志和YAML。 <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <art 阅读全文
posted @ 2020-12-01 09:04 codedot 阅读(274) 评论(0) 推荐(0) 编辑