NutzCN Logo
问答 aop注解声明式事务,方法断点进不去
发布于 253天前 作者 wx_chreg27pelvrqs93p1iq 419 次浏览 复制 上一个帖子 下一个帖子
标签:

调用接口日志

2021-12-03 17:41:56.046 [http-nio-8082-exec-1] [] DEBUG o.n.m.i.UrlMappingImpl - Found mapping for [POST] path=/CustomerCenter/weChatOperate : CustomerCenterModule.weChatOperate(CustomerCenterModule.java:26) 
2021-12-03 17:41:56.049 [http-nio-8082-exec-1] [] DEBUG o.n.ioc.impl.NutIoc - Get 'customerCenterModule'<class xxx.module.CustomerCenterModule> 
2021-12-03 17:41:56.049 [http-nio-8082-exec-1] [] DEBUG o.n.ioc.impl.NutIoc - 	 >> Load definition name=customerCenterModule 
2021-12-03 17:41:56.049 [http-nio-8082-exec-1] [] DEBUG o.n.i.l.c.ComboIocLoader - Found IocObject(customerCenterModule) in AnnotationIocLoader(packages=[xxx]) 
2021-12-03 17:41:56.049 [http-nio-8082-exec-1] [] DEBUG o.n.ioc.impl.NutIoc - 	 >> Make...'customerCenterModule'<class xxx.module.CustomerCenterModule> 
2021-12-03 17:41:56.049 [http-nio-8082-exec-1] [] DEBUG o.n.i.i.ScopeContext - Save object 'customerCenterModule' to [app]  
2021-12-03 17:41:56.049 [http-nio-8082-exec-1] [] DEBUG o.n.i.a.i.DefaultMirrorFactory - Load class module.CustomerCenterModule without AOP 
2021-12-03 17:41:56.185 [http-nio-8082-exec-1] [] DEBUG o.n.ioc.impl.NutIoc - Get 'identLvlFirstService'<class xxx.service.identLvl.IdentLvlFirstService> 
2021-12-03 17:41:56.185 [http-nio-8082-exec-1] [] DEBUG o.n.ioc.impl.NutIoc - 	 >> Load definition name=identLvlFirstService 
2021-12-03 17:41:56.186 [http-nio-8082-exec-1] [] DEBUG o.n.i.l.c.ComboIocLoader - Found IocObject(identLvlFirstService) in AnnotationIocLoader(packages=[xxx]) 
2021-12-03 17:41:56.186 [http-nio-8082-exec-1] [] DEBUG o.n.ioc.impl.NutIoc - 	 >> Make...'identLvlFirstService'<class xxx.service.identLvl.IdentLvlFirstService> 
2021-12-03 17:41:56.186 [http-nio-8082-exec-1] [] DEBUG o.n.i.i.ScopeContext - Save object 'identLvlFirstService' to [app]  
2021-12-03 17:41:56.186 [http-nio-8082-exec-1] [] DEBUG o.n.ioc.impl.NutIoc - Get 'txREAD_COMMITTED'<interface org.nutz.aop.MethodInterceptor> 
2021-12-03 17:41:56.186 [http-nio-8082-exec-1] [] DEBUG o.n.ioc.impl.NutIoc - 	 >> Load definition name=txREAD_COMMITTED 
2021-12-03 17:41:56.187 [http-nio-8082-exec-1] [] DEBUG o.n.i.l.c.ComboIocLoader - Found IocObject(txREAD_COMMITTED) in TransIocLoader@1517964067 
2021-12-03 17:41:56.187 [http-nio-8082-exec-1] [] DEBUG o.n.ioc.impl.NutIoc - 	 >> Make...'txREAD_COMMITTED'<interface org.nutz.aop.MethodInterceptor> 
2021-12-03 17:41:56.187 [http-nio-8082-exec-1] [] DEBUG o.n.i.i.ScopeContext - Save object 'txREAD_COMMITTED' to [app]  
2021-12-03 17:41:56.208 [http-nio-8082-exec-1] [] DEBUG o.n.i.i.ScopeContext - Remove object 'identLvlFirstService' from [app]  
2021-12-03 17:41:56.209 [http-nio-8082-exec-1] [] DEBUG o.n.i.i.ScopeContext - Remove object 'customerCenterModule' from [app]  

调用方法代码

@IocBean
public class IdentLvlFirstService {

    @Inject
    private Dao dao;

    private static final Logger logger = LoggerFactory.getLogger(IdentLvlFirstService.class);

//    public int updateWithVersion(IdentLvlFirst identLvlFirst) {
//        return this.dao().updateWithVersion(identLvlFirst);
//    }

    @Aop(TransAop.READ_COMMITTED)
    public Long getUid() {

        IdentLvlFirst identLvlFirst = new IdentLvlFirst();
        dao.insert(identLvlFirst);
        identLvlFirst.setParentId(identLvlFirst.getUid());
        identLvlFirst.setStatus("01");
        dao.update(identLvlFirst);

        return identLvlFirst.getUid();
    }
}
@IocBy(type = ComboIocProvider.class, args = {"*js", "ioc/", // 读取ioc/下的js/json配置文件
        "*anno", "cn.com.cmbc.creditcard.chameleon", // 扫描package下的ioc注解
        "*tx", // 启用内置的事务拦截器 例如: @Aop(TransAop.txREAD_COMMITTED)
//        "*async", // 启用异步执行注解拦截器

nutz版本 1.r.69.20210929

3 回复

关掉就能? jdk什么版本

把注解去掉就可以进去,jdk版本是1.8.0_201

换了 1.r.68.v20201205 的版本可以了,1.r.69.20210929这个版本不行,这是啥原因,改动了啥?

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