Spring boot配置文件读取

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

github.clint.id=1234567890


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



即可读取配置项的值。
原文地址:https://www.cnblogs.com/zmld-cn/p/12728897.html