NutzCN Logo
问答 如何在 idea 中使用 redis 插件
发布于 2442天前 作者 佐蓝 3704 次浏览 复制 上一个帖子 下一个帖子
标签:

redis 配置文件在 etc 目录中,读取不到配置

下面的一段,使用 conf.get 是可以读取到的,但是 args: ["com.alibaba.druid.pool.DruidDataSource", "oracle."] 读取不到

将 etc 加到 sources 中之后可以读取到,但这就没有意义了,请问有什么办法吗

 conf: {
        type: "org.nutz.ioc.impl.PropertiesProxy",
        fields: {
            paths: ["etc/"]
        }
    },
    dataSource: {
        factory: "$conf#make",
        args: ["com.alibaba.druid.pool.DruidDataSource", "oracle."],
        type: "com.alibaba.druid.pool.DruidDataSource",
        events: {
            create: "init",
            depose: 'close'
        }
    },
    dao: {
        type: "org.nutz.dao.impl.NutDao",
        args: [{
            refer: "dataSource"
        }]
    }
3 回复

src/main/resources/etc

放在上述目录中

谢谢兽总,是我弄错了

添加回复
请先登陆
回到顶部