springboot中获取配置文件的值
1.在application.properties中
ds-portal_service_port=http://192.168.**.**:10001
2.在java中
@Autowired
private Environment environment;
String portalPort = environment.getProperty("ds-portal_service_port");//获取
1.在application.properties中
ds-portal_service_port=http://192.168.**.**:10001
2.在java中
@Autowired
private Environment environment;
String portalPort = environment.getProperty("ds-portal_service_port");//获取