1.5K Star 12.1K Fork 3.2K

GVP轨迹 / J-IM

 / 详情

启用cluster,redis加载配置文件路径为resources根目录,但目前都放到config目录下,导致加载不了

待办的
创建于  
2020-05-07 17:20

org.jim.core.cache.redis.RedisConfigurationFactory

 public static RedisConfiguration parseConfiguration() throws Exception {
        ClassLoader standardClassloader = Thread.currentThread().getContextClassLoader();
        URL url = null;
        if (standardClassloader != null) {
            url = standardClassloader.getResource("jim.properties");
        }

        if (url == null) {
            url = JimVersion.class.getResource("jim.properties");
        }

        if (url != null) {
            LOG.debug("Configuring redis from jim.properties found in the classpath: " + url);
        } else {
            LOG.warn("No configuration found. Configuring redis from jim.properties  found in the classpath: {}", url);
        }

        RedisConfiguration configuration = parseConfiguration(url);
        return configuration;
    }

if (standardClassloader != null) {
url = standardClassloader.getResource("jim.properties");
}
这里应该修改为url = standardClassloader.getResource("config/jim.properties");或者把jim.properties移到resources根目录也行

评论 (2)

舒服吗 创建了任务
舒服吗 关联仓库设置为轨迹/J-IM
展开全部操作日志

get,等我fix

:joy: 直接自己移动不就行了大兄弟,我也在这里搞半天,看了好一会儿源码才搞清楚

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(3)
410355 xchao 1578923025 1936038 misland 1604388044
Java
1
https://gitee.com/xchao/j-im.git
git@gitee.com:xchao/j-im.git
xchao
j-im
J-IM

搜索帮助

14c37bed 8189591 565d56ea 8189591