随笔分类 -  Spring Boot

摘要:修改默认加载的配置文件,加载指定的配置文件。 @PropertySources 格式:@PropertySources(value={"classpath:xxx.xxx"}) @ImportReSources 格式:@ImportResources(locations={"xxx.xxx"}) 阅读全文
posted @ 2019-06-15 21:20 Aml 阅读(319) 评论(0) 推荐(0)
摘要:都是读取配置文件属性 1. @ConfigurationProperties(prefix = "person")读取多个属性 1. @value读取单个属性 注意事项:maps 和dog 不能使用@value注解,@Value不支持复杂类型 application.properties文件配置 两 阅读全文
posted @ 2019-06-15 11:09 Aml 阅读(4980) 评论(0) 推荐(0)
摘要:使用热部署提高开发效率,修改代码无需重复启动。配置如下所示: 重新加载(Intellij IDEA):ctrl+F9 阅读全文
posted @ 2019-06-12 09:05 Aml 阅读(367) 评论(0) 推荐(0)