use of io.mycat.route.impl.DruidMycatRouteStrategy in project Mycat_plus by coderczp.
the class RouteStrategyFactory method init.
public static void init() {
SystemConfig config = MycatServer.getInstance().getConfig().getSystem();
String defaultSqlParser = config.getDefaultSqlParser();
defaultSqlParser = defaultSqlParser == null ? "" : defaultSqlParser;
// 修改为ConcurrentHashMap,避免并发问题
strategyMap.putIfAbsent("druidparser", new DruidMycatRouteStrategy());
defaultStrategy = strategyMap.get(defaultSqlParser);
if (defaultStrategy == null) {
defaultStrategy = strategyMap.get("druidparser");
defaultSqlParser = "druidparser";
}
config.setDefaultSqlParser(defaultSqlParser);
isInit = true;
}
use of io.mycat.route.impl.DruidMycatRouteStrategy in project Mycat-Server by MyCATApache.
the class RouteStrategyFactory method init.
public static void init() {
SystemConfig config = MycatServer.getInstance().getConfig().getSystem();
String defaultSqlParser = config.getDefaultSqlParser();
defaultSqlParser = defaultSqlParser == null ? "" : defaultSqlParser;
// 修改为ConcurrentHashMap,避免并发问题
strategyMap.putIfAbsent("druidparser", new DruidMycatRouteStrategy());
defaultStrategy = strategyMap.get(defaultSqlParser);
if (defaultStrategy == null) {
defaultStrategy = strategyMap.get("druidparser");
defaultSqlParser = "druidparser";
}
config.setDefaultSqlParser(defaultSqlParser);
isInit = true;
}
Aggregations