私は JSF 2.2 + Spring フレームワーク 3.2.4 を使用しています
だから、私はこのapplicationContent.xmlを持っています
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.2.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.2.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx.xsd">
<aop:aspectj-autoproxy proxy-target-class="true" />
<tx:annotation-driven transaction-manager="transactionManager"/>
<context:annotation-config/>
<context:component-scan base-package="com.vulcan.controller" />
<context:component-scan base-package="com.vulcan.service" />
<context:component-scan base-package="com.vulcan.dao" />
<context:component-scan base-package="com.vulcan.spring.aop" />
.....
それから私はアスペクトコンポーネントを持っています
package com.vulcan.spring.aop;
@Aspect
public class LoggingService {
private Log log = LogFactory.getLog(this.getClass());
@Pointcut("execution(* *.*(..))")
protected void loggingOperation() {}
@Before("loggingOperation()")
public void logJoinPoint()
{
System.out.println ("Hello");
}
....
このタイプの実行では、このポイントカットがすべてのメソッドでトリガーされると想定しています。しかし問題は、このポイントカットがトリガーされないことです。理由はありますか?ありがとう
参考までに、私はグラスフィッシュ 4 を使用しており、Web アプリをデプロイするときにエラー構成を受け取りませんでした。したがって、私の構成は問題ないと思います。