zoukankan      html  css  js  c++  java
  • 获取配置文件内容

    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);		
    	}
    
    }
    
  • 相关阅读:
    安全
    请求
    使用 Fetch
    安全
    script
    PWA
    link(外部资源关系)
    base(根URL)
    缓存
    IndexedDB基本概念
  • 原文地址:https://www.cnblogs.com/lxaic/p/6226511.html
Copyright © 2011-2022 走看看