FaqBoardImpl.java
package sp.aop.service; import org.springframework.stereotype.Component;
@Component("faqBoard") @Override |
NoticeBoardImpl.java
package sp.aop.service; import org.springframework.stereotype.Component;
@Component("noticeBoard") @Override |
BoardController.java
package sp.aop.controller; import javax.annotation.Resource; import org.springframework.web.servlet.ModelAndView; import sp.aop.service.Board;
public class BoardController extends
@Resource(name="noticeBoard") } |
LogAdvice.java
package sp.aop.advice; import org.aspectj.lang.ProceedingJoinPoint;
public class LogAdvice { public Object logPrint(ProceedingJoinPoint joinPoint) throws Throwable{ System.out.println("***** START *****"); |
spring302-servlet.xml
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans"
<context:annotation-config/> </beans> |
결과
<<===== START =====>> |
'프로그램 > Spring 3.0' 카테고리의 다른 글
Advice 타입 별 클래스 작성 <aop:after-throwing> (0) | 2012.05.05 |
---|---|
Advice 타입 별 클래스 작성 <aop:before>, <aop:after-returning> (0) | 2012.05.03 |
AOP - XML 스키마 기반 - Aspect 설정 (0) | 2012.05.01 |
AOP - XML 스키마 기반 (0) | 2012.05.01 |
AOP(Aspect Oriented Programming) (0) | 2012.04.30 |