获取配置文件内容
public class ContextConfig { private static final Logger logger = LoggerFactory.getLogger(ContextConfig.class); private static ResourceBundle resource = null; private static boolean isDev = true; public static boolean getDev(){ return isDev; } public static String getConfigValue(String value){ if(null == resource){ resource = PropertyResourceBundle.getBundle("文件名"); } if(null == value){ logger.info("getConfigValue value is null"); isDev = false; return null; } return resource.getString(value); } }