Spring项目判断当前环境的正确姿势

Profiles profile = Profiles.of("p");
boolean isPEnv = environment.acceptsProfiles(profile);

import org.springframework.core.env.Environment;
import org.springframework.core.env.Profiles;
posted @ 2020-03-03 15:38  孤僻的小孩  阅读(1473)  评论(0编辑  收藏  举报