var ioc={
dataSource : {
type : "com.mchange.v2.c3p0.ComboPooledDataSource",
events : {
depose : 'close'
},
fields : {
driverClass : 'com.mysql.jdbc.Driver',
jdbcUrl : 'jdbc:mysql:///test',
user : 'root',
password : '11800'
}
},
dao:{
type:"org.nutz.dao.impl.NutDao",
args:[{ refer : "dataSource" }]
},
loginerService:{
type:"com.service.impl.LoginerSerImpl",
args:[{ refer : "dao" }]
}
}
@IocBean
public class LoginerSerImpl implements LoginerService{
@Inject
private Dao dao;
@Override
public void insertLog(Loginer loginer) {
dao.insert(loginer);
}
@IocBy(type = ComboIocProvider.class, args = {"*js","ioc/","*anno", "com.modules","*tx"})
@Modules(scanPackage=true)
public class ComeNutz {
}
@IocBean
public class LoginerAction {
@Inject
private LoginerService loginerService;
@At("/insert")
@Ok("redirect:select")
public void inser(Loginer loginer){
loginerService.insertLog(loginer);
}
报错
WARN [http-8080-2] - Error@/insert :
org.nutz.ioc.IocException: create ioc bean fail name=loginerAction ioc define:
{
"type" :"com.modules.action.LoginerAction",
"singleton" :true,
"events" :{
},
"args" :[],
"fields" :[{
"name" :"loginerService",
"value" :{
"type" :"refer",
"value" :"loginerService"
},
"optional" :false
}],
"scope" :"app"
}
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:132)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:194)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:212)
Caused by: org.nutz.ioc.IocException: create ioc bean fail name=loginerService ioc define:
{
"type" :"com.service.impl.LoginerSerImpl",
"singleton" :true,
"args" :[{
"type" :"refer",
"value" :"dao"
}],
"fields" :[],
"scope" :"app"
}
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:132)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:194)
at org.nutz.ioc.val.ReferValue.get(ReferValue.java:24)
Caused by: org.nutz.lang.born.BorningException: Fail to born 'com.service.impl.LoginerSerImpl'
by args: [
@(org.nutz.dao.impl.NutDao@2369ffec)]
at org.nutz.lang.Mirror.getBorning(Mirror.java:895)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:96)
... 28 more
这是哪儿错了?