摘要: 1、在 resources目录下创建 custom.properties 文件,内容如下: custom.name=Java custom.module=thread 2、定义配置类(使用@Value注解注入属性值): @Component // 指定配置文件路径 @PropertySource(" 阅读全文
posted @ 2020-03-01 14:06 d0usr 阅读(926) 评论(0) 推荐(0) 编辑