NutzCN Logo
问答 redsi整合nuzt运行暴多
发布于 1688天前 作者 wx_39u0hgqone1gvi5visa5 1381 次浏览 复制 上一个帖子 下一个帖子
标签:

@IocBean
@At("/user")
public class UserModules {

   @Inject
    protected Dao dao; //就这么注入了,有@IocBean它才会生
   @Inject JedisAgent jedisAgent;
      @At
    public void logout() {
        Jedis jedis = jedisAgent.getResource();
            String re = jedis.set("_nutzbook_test_key", "redis测试");
            System.out.println("redis say : " + re);
            re = jedis.get("_nutzbook_test_key");
            System.out.println("从redis去除"+re);
        session.invalidate();
    }       

}
redis.properties:
redis.host=localhost
redis.port=6379
redis.timeout=2000

redis.password=wendal.net

redis.database=0

redis.mode=cluster

项目报错:
org.nutz.ioc.IocException: [userModules, jedisAgent, conf] # For object [conf] - type:[]

6 回复

没看到报错信息

2020-4-5 19:27:44.376 WARN [http-bio-8080-exec-3] Error@/user/login :
org.nutz.ioc.IocException: [userModules, jedisAgent, conf] # For object [conf] - type:[]
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:218)
at org.nutz.ioc.val.ReferValue.get(ReferValue.java:24)
at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:31)
at org.nutz.ioc.weaver.DefaultWeaver.fill(DefaultWeaver.java:56)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:135)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:210)
at org.nutz.ioc.val.ReferTypeValue.get(ReferTypeValue.java:26)
at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:31)
at org.nutz.ioc.weaver.DefaultWeaver.fill(DefaultWeaver.java:56)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:135)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:210)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:239)
at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:116)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.nutz.mvc.impl.processor.EncodingProcessor.process(EncodingProcessor.java:27)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor.process(UpdateRequestAttributesProcessor.java:15)
at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:44)
at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:67)
at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:31)
at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:198)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:492)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:165)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:1025)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:452)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1195)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:654)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:319)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.nutz.ioc.ObjectLoadException: Object 'conf' without define!
at org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:174)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:180)
... 37 more

Caused by: org.nutz.ioc.ObjectLoadException: Object 'conf' without define!

缺conf嘛, dao.js 没改好

我在配置文件配置的这些信息为什么没起作用呢?
redis.properties:
redis.host=localhost
redis.port=6379
redis.timeout=2000

先把conf配好再说

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