获取配置文件
@Autowired private Environment env; @Test public void env(){ String[] activeProfiles = env.getActiveProfiles(); for (String activeProfile : activeProfiles) { if(!activeProfile.equals("prod")){ System.out.println(); } } }
本文来自博客园,作者:King-DA,转载请注明原文链接:https://www.cnblogs.com/qingmuchuanqi48/p/11949422.html