私の側面の1つでは、次の方法があります。
@Before("execution (* org.xx.xx.xx..*.*(@Standardized (*),..))")
public void standardize(JoinPoint jp) throws Throwable {
}
目標は、@ Standardizedで注釈が付けられたパラメーターが少なくとも1つある(異なる@Standardizedで注釈が付けられたタイプではない)アプリケーションパッケージのすべてのメソッドを見つけることです。
ps:@Standardizedはカスタムアノテーションです。
ドキュメントで読んだことから、この設定は正しいものであるはずです(そうでない場合はお知らせください)が、アプリケーションをJBossサーバーにデプロイすると、次の例外が発生します。
java.lang.IllegalArgumentException:このタイプ名に一致しない警告:標準化
詳細:
11.05.12 17:02:35 ERROR - ContextLoader.java@initWebApplicationContext: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.config.internalTransactionAdvisor': Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: warning no match for this type name: Standardized [Xlint:invalidAbsoluteTypeName]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:290)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
(@Standardized(*)、..)の代わりに(@Standardized *、..)を試してみましたが(私が知っているのと同じ結果にはなりません)、それでも同じエラーが発生します。
誰かが理由を知っていますか?
助けてくれてありがとう。
よろしく。