Examples of APDPlatConfig


Examples of org.apdplat.module.system.model.APDPlatConfig

     * 将配置文件里面的配置信息导入数据库,如果数据库中已经存在相应的配置信息,则忽略导入
     */
    private void syncToDB(){
        Properties properties = PropertyHolder.getProperties();
        for(Object key : properties.keySet()){
            APDPlatConfig config = new APDPlatConfig();
            config.setConfigKey(key.toString());
            String value = properties.getProperty(key.toString());
            config.setConfigValue(value);
            try{
                serviceFacade.create(config);
                LOG.info("成功将配置项 "+key+"="+value+" 加入数据库");
            }catch(Exception e){
                LOG.info("配置项 "+key+" 已经存在于数据库中,配置文件中的值不会覆盖数据库中的值,如需覆盖,则启用配置config.db.override=true");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.