您的位置:首页 > 编程语言 > Java开发

Spring 整合Hibernate 报错Pointcut is malformed: warning no match for this type name: com.ren.spring.hibe

2017-03-01 18:32 786 查看
今天Spring整合Hibernate时在Spring的配置文件中报错如下:

Pointcut is malformed: warning no match for this type name: com.ren.spring.hibernate.service


我配置切点的代码如下:

<aop:config>
<aop:pointcut expression="execution(* com.ren.spring.hibernate.service.*(..))" id="poincut"/>
<aop:advisor advice-ref="txAdvice" pointcut-ref="poincut"/>
</aop:config>


出错原因:
expression="execution(* com.ren.spring.hibernate.service.*(..))"表达式写错了,应该是:expression="execution(* com.ren.spring.hibernate.service.*.*(..))",第一个*含义是:代表所有类型的返回值,第二个*是代表com.ren.spring.hibernate.service包下的所有类,第三个是类下的所有方法,括号中两个点表示任意个形参。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  hibernate spring 整合
相关文章推荐