2019-07-05 11:15
如果是注入接口,事先做个映射:
AopManager.me().addMapping(UserService.class, UserServiceImpl.class);
如果不做映射,需要在 @Inject 上传参:
@Inject(UserServiceImpl.class)
UserService srv;
文档中都有:
https://www.jfinal.com/doc/4-6
如果还是不能注入,只剩一个可能:@Inject 注解来自别的第三方包,检查一下头部的 import xxxx.Inject 是不是来自 com.jfinal.aop 这个包