내 프로젝트는 스프링 프레임 워크 2.5.4를 기반으로합니다. 그리고 나는 일부 컨트롤러 (aspectj 1.5.3 사용)에 대한 aspect를 추가하려고한다.Aspectj는 스프링 프레임 워크에서 모든 이벤트를 잡아 내지 못합니까?
내가 응용 프로그램-servlet.xml 파일에 자동 프록시를 설정 한, 그냥 xml 파일의 끝에 다음 줄을 붙여 :
<aop:aspectj-autoproxy />
<bean id="auditLogProcessor" class="com.example.bg.web.utils.AuditLogProcessor" />
만든 측면 :
package com.example.bg.web.utils;
import org.apache.log4j.Logger;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
@Aspect
public class AuditLogProcessor
{
private final static Logger log = Logger.getLogger(AuditLogProcessor.class);
@After("execution(* com.example.bg.web.controllers.assets.AssetThumbnailRebuildController.rebuildThumbnail(..))")
public void afterHandleRequest() {
log.info("test111");
}
@After("execution(* com.example.bg.web.controllers.assets.AssetThumbnailRebuildController.rebuildThumbnail(..))")
public void afterRebuildThumbnail() {
log.info("test222");
}
}
내 컨트롤러 :
class AssetAddController implements Controller
class AssetThumbnailRebuildController extends MultiActionController
aspect 어드바이저에 브레이크 포인트를 설정하고 컨트롤러를 호출 할 때 afterHandleRequest() but afterRebildThumbnail() 내가 뭘 잘못 했니?
참고
내가 SO 베타에 액세스 할 수없는 내 친구 대신에이 질문을 부탁 해요, 나는 그것이 다 무슨 단서가 없습니다. 실제로 몇몇 철자 오류가 있었다
편집, 감사 Cheekysoft. 그러나 문제는 여전히 지속됩니다.