//yml:
server.port=80
apikey=sdflksdhiufsdhgsdfhgdsfhg
//java:
@Value("${server.port}")
private String port;
@Value("${apikey}")
private String apikey;
//yml
wechart:
xxx: 111
yyy: 333
zzz: 222
aaa: 444
// java
@ConfigurationProperties(prefix = "wechart")
@Component
@Data
public class WechartProperties{
private String xxx;
private String yyy;
private String zzz;
private String aaa;
}