cn.tenmg.sqltool.SqltoolContext Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sqltool Show documentation
Show all versions of sqltool Show documentation
一个提供动态结构化查询语言(DSQL)解析和执行的通用ORM框架(连接池在分布式环境适用),支持包括MySQL、PostgreSQL、Oracle、SQLServer在内的多种数据库。
The newest version!
package cn.tenmg.sqltool;
import java.util.Iterator;
import java.util.Map.Entry;
import java.util.Properties;
import cn.tenmg.dsl.utils.PlaceHolderUtils;
import cn.tenmg.dsl.utils.PropertiesLoaderUtils;
/**
* Sqltool上下文
*
* @author June [email protected]
*
* @since 1.4.3
*/
public abstract class SqltoolContext {
private static final String DEFAULT_STRATEGIES_PATH = "sqltool-context-loader.properties",
CONFIG_LOCATION_KEY = "config.location", DEFAULT_CONFIG_LOCATION = "sqltool-context.properties";
private static Properties config = new Properties();
static {
config.putAll(System.getenv());// 系统环境变量
config.putAll(System.getProperties());// JVM环境变量
PropertiesLoaderUtils.loadIgnoreException(config, DEFAULT_STRATEGIES_PATH);
PropertiesLoaderUtils.loadIgnoreException(config, "sqltool-default.properties");
PropertiesLoaderUtils.loadIgnoreException(config,
config.getProperty(CONFIG_LOCATION_KEY, DEFAULT_CONFIG_LOCATION));
Object value;
Entry
© 2015 - 2024 Weber Informatics LLC | Privacy Policy