在调用 org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean 上的任何方法之前,我需要做一些事情。因此我使用一个表达式
@Around("执行。(*org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.*(..)")
。
但我得到一个异常(exception),说
org.springframework.beans.factory.BeanCreationException: Error creating beanwithname 'org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0': Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: Pointcut is not well-formed: expecting 'name pattern' at character position 80.
你能告诉我我在这里做错了什么吗?
最佳答案
* 和 org.springframework.orm.jpa 之间需要有一个空格字符...
开头的 * 是方法返回类型的通配符。
关于java - AOP表达问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7161263/