講師回答 / moocer
<context:component-scan base-package="com.imooc" scoped-proxy="no">或<context:component-scan base-package="com.imooc" scoped-proxy="interfaces">或<context:component-scan base-package="com.imooc" scoped-proxy="targetClass">
講師回答 / moocer
你的代碼是課程的示例代碼嗎?如果是示例代碼,調(diào)用是在junit中,所以junit會(huì)報(bào)錯(cuò)
最新回答 / ATWJSW
這樣可能會(huì)影響性能,開啟事務(wù)通常都會(huì)對(duì)數(shù)據(jù)庫加鎖,應(yīng)該盡量少用,查詢邏輯,單個(gè)更新邏輯不需要開啟事務(wù)
2014-12-05
已采納回答 / moocer
1.這里的可以把這里public void pointcut() {}方法理解成具體pointcut(切入點(diǎn))的聲明,實(shí)際對(duì)應(yīng)的切入點(diǎn)是“execution(* com.imooc.aop.aspectj.biz.*Biz.*(..))”;2.@AfterReturning,是在返回后執(zhí)行,returning="returnValue"的“returnValue”就是具體的方法(* com.imooc.aop.aspectj.biz.*Biz.*(..))的返回值,對(duì)應(yīng)public void afterR...
2014-11-30