<?xml version="1.0" encoding="UTF-8"?> <beans:beans xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.springframework.org/schema/data/jpa" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa.xsd"> <!-- spring data jpa repository base-package:扫描的包,所有继承GenericRepository的接口所在的包需要在这里定义 repository-impl-postfix:仓库自定义实现类型的后缀 自动扫描并添加到接口的实现 factory-class 仓库接口的实现工厂 --> <repositories base-package="com.uas.saas" entity-manager-factory-ref="entityManagerFactory" transaction-manager-ref="transactionManager" repository-impl-postfix="Impl"> </repositories> </beans:beans>