摘要: 修改默认加载的配置文件,加载指定的配置文件。 @PropertySources 格式:@PropertySources(value={"classpath:xxx.xxx"}) @ImportReSources 格式:@ImportResources(locations={"xxx.xxx"}) 阅读全文
posted @ 2019-06-15 21:20 Aml 阅读(301) 评论(0) 推荐(0) 编辑
摘要: 都是读取配置文件属性 1. @ConfigurationProperties(prefix = "person")读取多个属性 1. @value读取单个属性 注意事项:maps 和dog 不能使用@value注解,@Value不支持复杂类型 application.properties文件配置 两 阅读全文
posted @ 2019-06-15 11:09 Aml 阅读(4910) 评论(0) 推荐(0) 编辑