js 文件
var ioc = {
conf : {
type : "org.nutz.ioc.impl.PropertiesProxy",
fields : {
paths : [ "custom/" ]
}
},
zMongo : {
args : [ {
java : "$conf.get('mongo.host')"
}, {
java : "$conf.getInt('mongo.port')"
} ],
factory : "org.nutz.mongo.ZMongo#me"
},
zMoDB : {
args : [ {
java : "$conf.get('mongo.db')"
} ],
factory : "$zMongo#db"
}
};
实在没看出是哪里的问题
启动报错
Exception in thread "main" org.nutz.ioc.IocException: IocBean[zMoDB -> zMongo] For object [zMongo] - type:[]
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:218)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:239)
at org.nutz.ioc.impl.ObjectMakerImpl$1.born(ObjectMakerImpl.java:88)
at org.nutz.ioc.weaver.DefaultWeaver.born(DefaultWeaver.java:67)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:114)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:210)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:239)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:146)
at com.anawin.tools.IocProvider.me(IocProvider.java:50)
at com.anawin.tools.IocProvider.main(IocProvider.java:82)
Caused by: java.lang.NullPointerException
at java.lang.Class.isAssignableFrom(Native Method)
at org.nutz.ioc.aop.impl.DefaultMirrorFactory.getMirror(DefaultMirrorFactory.java:49)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:36)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:210)
... 9 more