Spring boot配置文件读取

在配置文件application.properties里面配置,如下:

github.clint.id=1234567890


在代码中,配置如下:
@Value("${github.clint.id}")
private String clientId;



即可读取配置项的值。
posted @ 2020-04-18 23:08  ¥芝麻绿豆¥  阅读(131)  评论(0编辑  收藏  举报