360doc--昵稱13366901的文章 360doc--昵稱13366901的文章 http://www.hbhlny.cn/rssperson/13366901.aspx 360doc (http://www.hbhlny.cn) zh-cn 360doc--個(gè)人圖書(shū)館 采用spring AOP 和注解解決日志 http://www.hbhlny.cn/content/13/0801/17/13366901_304081768.shtml 2013/8/1 17:26:08
Spring入門(mén)教程 http://www.hbhlny.cn/content/13/0801/17/13366901_304081000.shtml 2013/8/1 17:23:21
spring
Spring AOP示例(注解方式) http://www.hbhlny.cn/content/11/1206/13/1947337_170080370.shtml 2013/8/1 17:18:33
Spring AOP示例(注解方式)@Pointcut("execution(* com.yyj.service.*.*(..))")定義一個(gè)切入點(diǎn), 后面的表達(dá)式說(shuō)明對(duì)com.yyj.service包及子包下的所有方法進(jìn)行攔截,植入其它操作, 其它操作由對(duì)應(yīng)的Advise定義。@Before("com.yyj.aspect.TestAspect.testPointCut()") private void testBefore(){ System.out.println("begin-----in-----");4.定義測(cè)試類(lèi)package com.yyj.service;import org.springframework.stereotype.Component;