至高吴上(Alfa.wu)

一个人,一生,能坚持做好一件事情是多么的牛XX啊!!!

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

在加上JPA的配置外,还需要再加上 :
xmlns:repository="http://www.springframework.org/schema/data/repository"
http://www.springframework.org/schema/data/repository http://www.springframework.org/schema/data/repository/spring-repository.xsd

否则 会提示 找不到 exclude-filter 这个元素,
在配上上面的定义后, 就可以使用排除:
<repository:exclude-filter type="regex" expression=".*DAO"/>

以下是相关关键代码:

xmlns 配置说明 :

描包及排除 配置说明 :

<jpa:repositories base-package="com.XXX.XX.XXX.dao"  repository-impl-postfix="Impl" entity-manager-factory-ref="entityManagerFactory" transaction-manager-ref="transactionManager"  >
	<repository:exclude-filter type="regex" expression=".*DAO"/>
</jpa:repositories>
posted on 2016-07-07 11:02  Alfa  阅读(868)  评论(0编辑  收藏  举报