Spring Boot获取profile值

Environment方式

1
2
3
4
@Autowired
Environment environment;

String profile = environment.getActiveProfiles()[0];

Powered by AppBlog.CN     浙ICP备14037229号

Copyright © 2012 - 2020 APP开发技术博客 All Rights Reserved.

访客数 : | 访问量 :