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

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

import org.springframework.core.env.Environment;
import org.springframework.core.env.Profiles;
原文地址:https://www.cnblogs.com/zyzblogs/p/12402640.html