标签:
private List<SpringPersistenceUnitInfo> readPersistenceUnitInfos() {List<SpringPersistenceUnitInfo> infos = new LinkedList<SpringPersistenceUnitInfo>();boolean buildDefaultUnit = (this.packagesToScan != null || this.mappingResources != null);PersistenceUnitReader reader = new PersistenceUnitReader(this.resourcePatternResolver, this.dataSourceLookup);SpringPersistenceUnitInfo[] readInfos = reader.readPersistenceUnitInfos(this.persistenceXmlLocations);for (SpringPersistenceUnitInfo readInfo : readInfos) {infos.add(readInfo);if (this.defaultPersistenceUnitName != null &&this.defaultPersistenceUnitName.equals(readInfo.getPersistenceUnitName())) {buildDefaultUnit = false;}}if (buildDefaultUnit) {infos.add(buildDefaultPersistenceUnitInfo());}return infos;} |
不在JPA 的 persistence.xml 文件中配置Entity class的解决办法
标签:
原文地址:http://blog.csdn.net/sunitjy/article/details/44451581