启动时候报错,
WARN - Moudle with @InjectName('userModule') or @IocBean('userModule') but no such ioc bean found!! Pls check your ioc configure!!
这是因为dao.js里面没有加配置的问题吗?
多谢回复!
MaiModule:
package net.wendal.nutzbook;
import org.nutz.mvc.annotation.IocBy;
import org.nutz.mvc.annotation.Modules;
import org.nutz.mvc.annotation.SetupBy;
import org.nutz.mvc.ioc.provider.ComboIocProvider;
@SetupBy(value=MainSetup.class)
@IocBy(type=ComboIocProvider.class,
args={
"*js","ioc/","anno","net.wendal.nutzbook","*tx"
})
@Modules(scanPackage=true)
public class MainModule {
}
UserModule:
package net.wendal.nutzbook.module;
import net.wendal.nutzbook.bean.User;
import org.nutz.dao.Dao;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Fail;
import org.nutz.mvc.annotation.Ok;
@IocBean
@At("/user")
@Ok("json")
@Fail("http:500")
public class UserModule {
@Inject
protected Dao dao;
@At
public int count() {
return dao.count(User.class);
}
}