NutzCN Logo
问答 通过注解将MsgPushService注入到MsgPushInterceptor时为空,求解
发布于 2865天前 作者 qq_30fdbc0f 2513 次浏览 复制 上一个帖子 下一个帖子
标签: aop ioc

通过注解将MsgPushService注入到MsgPushInterceptor时为空,求解。
@IocBean
public class MsgPushService
@IocBean
public class MsgPushInterceptor implements MethodInterceptor{

@Inject
private MsgPushService msgPushService;
6 回复

有没有用js配置了这个bean,导致重复了?

来自炫酷的 NutzCN

可以的话试试1.r.56.r3

来自炫酷的 NutzCN

*用js配置的aop
var ioc = {
$aop : {
type : 'org.nutz.ioc.aop.config.impl.JsonAopConfigration',
fields : {
itemList : [
['com.dialect.module.manage.TopicModule', '^add$', 'com.dialect.interceptor.MsgPushInterceptor', 'false']
]
}

}

}*

我用的就是最新版1.r.56.r3,理论上这样是用是可以的是吧? 注入为空还是我的用法的问题。

写错了,不是直接写类名,而是 ioc:类名首字母小写

来自炫酷的 NutzCN

搞定,非常感谢wendal!!!

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