В настоящее время я работаю над проектом в Ваадине с Spring Boot, и я хочу повторно использовать некоторые репозитории из другого проекта, не добавляя этот проект как зависимость, но когда я пытаюсь запустить проект I получить эту ошибку:Spring Boot + JPA + Hibernate - BeanCreationException
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataCache': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.myproject.vas.aftersales.repository.AfterSalesFileRepository com.myproject.vas.DataCache.afterSalesFileRepository; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'afterSalesFileRepository': Invocation of init method failed; nested exception is java.lang.AbstractMethodError: org.springframework.data.repository.core.support.RepositoryFactorySupport.getTargetRepository(Lorg/springframework/data/repository/core/RepositoryInformation;)Ljava/lang/Object;
Я искал в Интернете решений и попытался все, что я мог найти от переключения пакетов на изменения версий зависимостей в ...
Мой репозиторий:
@Component
public interface AfterSalesFileRepository extends JpaRepository<AfterSalesFile, Integer> {
@Query("select m from AfterSalesFile m " +
"where m.id=:id and m.status is not 'INACTIVE'")
AfterSalesFile findOne(@Param("id") final Integer id);
}
Класс, который пытается инициализировать и использовать репозиторий:
@Component
public class DataCache {
@Getter(AccessLevel.PRIVATE)
private CustomerIdentityRepository customerIdentityRepository;
@Autowired
private AfterSalesFileRepository afterSalesFileRepository;
@Autowired
public DataCache(CustomerIdentityRepository customerIdentityRepository) {
this.customerIdentityRepository = customerIdentityRepository;
}
...
public List<AfterSalesFile> getAllAftersales() {
return afterSalesFileRepository.findAll();
}
}
Мой databaseconfiguration:
@Configuration
public class DatabaseConfiguration implements EnvironmentAware {
private RelaxedPropertyResolver jpaPropertyResolver;
@Autowired(required = false)
private PersistenceUnitManager persistenceUnitManager;
@Override
public void setEnvironment(Environment environment) {
this.jpaPropertyResolver = new RelaxedPropertyResolver(environment, "spring.jpa.");
}
@Bean
@DependsOn("jdbcTemplate")
public LocalContainerEntityManagerFactoryBean entityManagerFactory(DataSource dataSource, JpaVendorAdapter jpaVendorAdapter) {
LocalContainerEntityManagerFactoryBean entityManagerFactoryBean = new LocalContainerEntityManagerFactoryBean();
if (persistenceUnitManager != null) {
entityManagerFactoryBean
.setPersistenceUnitManager(persistenceUnitManager);
}
entityManagerFactoryBean.setJpaVendorAdapter(jpaVendorAdapter);
entityManagerFactoryBean.setDataSource(dataSource);
entityManagerFactoryBean.setPackagesToScan("com.myproject.vas.aftersales");
entityManagerFactoryBean.getJpaPropertyMap().putAll(jpaPropertyResolver.getSubProperties("properties."));
Map<String, Object> properties = entityManagerFactoryBean.getJpaPropertyMap();
properties.put("hibernate.ejb.naming_strategy", jpaPropertyResolver.getProperty("hibernate.naming-strategy", SpringNamingStrategy.class.getName()));
properties.put("hibernate.hbm2ddl.auto", jpaPropertyResolver.getProperty("hibernate.ddl-auto", "none"));
properties.put("hibernate.show_sql", jpaPropertyResolver.getProperty("hibernate.show_sql", "false"));
return entityManagerFactoryBean;
}
}
Мой главный:
@SpringBootApplication
@EnableJpaRepositories(basePackages = {"com.myproject.vas.aftersales.repository"})
@ComponentScan(basePackages = {"com.myproject"})
public class VasApplication {
public static void main(String[] args) {
SpringApplication.run(VasApplication.class, args);
}
}
Мой POM:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>my-project</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
...
<dependencies>
<!-- Vaadin -->
... Vaadin dependencies
<!-- hibernate dependencies -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.1-api</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>sqljdbc4</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
</dependency>
<!-- testing -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>4.1.6.RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<!--<version>4.0.3.RELEASE</version>-->
</dependency>
</dependencies>
</project>
UPDATE
МВН зависимость: дерево
[INFO] --- maven-dependency-plugin:2.9:tree (default-cli) @ infopoint ---
[INFO] com.asadventure:infopoint:jar:0.0.1-SNAPSHOT
[INFO] +- com.asadventure:customer-service:jar:crm-SNAPSHOT:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-consul-all:jar:1.0.0.M4:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-starter-consul-config:jar:1.0.0.M4:compile
[INFO] | | | \- org.springframework.cloud:spring-cloud-starter-consul:jar:1.0.0.M4:compile
[INFO] | | \- org.springframework.cloud:spring-cloud-starter-consul-discovery:jar:1.0.0.M4:compile
[INFO] | | \- org.springframework.cloud:spring-cloud-netflix-core:jar:1.0.3.RELEASE:compile
[INFO] | +- com.asadventure:LoggingUtils:jar:1.0.0:compile
[INFO] | | +- org.springframework:spring-webmvc:jar:4.2.3.RELEASE:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-core:jar:8.0.22:compile
[INFO] | | \- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.6.3:compile
[INFO] | +- com.asadventure:job-fetch-interface:jar:crm-SNAPSHOT:compile
[INFO] | +- com.asadventure:data-utils:jar:crm-SNAPSHOT:compile
[INFO] | | +- com.datastax.cassandra:cassandra-driver-core:jar:2.1.6:compile
[INFO] | | | \- com.codahale.metrics:metrics-core:jar:3.0.2:compile
[INFO] | | \- org.springframework.data:spring-data-cassandra:jar:1.1.2.RELEASE:compile
[INFO] | | \- org.springframework.data:spring-cql:jar:1.1.2.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-web:jar:1.3.0.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-tomcat:jar:1.3.0.RELEASE:compile
[INFO] | | | +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.0.28:compile
[INFO] | | | +- org.apache.tomcat.embed:tomcat-embed-logging-juli:jar:8.0.28:compile
[INFO] | | | \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.0.22:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-validation:jar:1.3.0.RELEASE:compile
[INFO] | | | \- org.hibernate:hibernate-validator:jar:5.1.3.Final:compile
[INFO] | | | +- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] | | | \- com.fasterxml:classmate:jar:1.1.0:compile
[INFO] | | \- com.fasterxml.jackson.core:jackson-databind:jar:2.6.3:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-zuul:jar:1.0.2.RELEASE:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-starter:jar:1.0.1.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-actuator:jar:1.3.0.RELEASE:compile
[INFO] | | | \- org.springframework.boot:spring-boot-actuator:jar:1.3.0.RELEASE:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-starter-hystrix:jar:1.0.2.RELEASE:compile
[INFO] | | | +- com.netflix.hystrix:hystrix-metrics-event-stream:jar:1.4.4:compile
[INFO] | | | \- com.netflix.hystrix:hystrix-javanica:jar:1.4.4:compile
[INFO] | | | +- org.aspectj:aspectjrt:jar:1.8.7:runtime
[INFO] | | | \- com.google.code.findbugs:jsr305:jar:3.0.0:runtime
[INFO] | | +- org.springframework.cloud:spring-cloud-starter-ribbon:jar:1.0.2.RELEASE:compile
[INFO] | | | \- com.netflix.rxjava:rxjava-core:jar:0.20.7:compile
[INFO] | | \- com.netflix.zuul:zuul-core:jar:1.0.28:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-security:jar:1.3.0.RELEASE:compile
[INFO] | | +- org.springframework:spring-aop:jar:4.2.3.RELEASE:compile
[INFO] | | \- org.springframework.security:spring-security-config:jar:4.0.3.RELEASE:compile
[INFO] | +- org.springframework.security.oauth:spring-security-oauth2:jar:2.0.8.RELEASE:compile
[INFO] | | \- commons-codec:commons-codec:jar:1.9:compile
[INFO] | +- org.springframework.security:spring-security-jwt:jar:1.0.3.RELEASE:compile
[INFO] | +- joda-time:joda-time:jar:2.8.1:compile
[INFO] | +- org.springframework.boot:spring-boot:jar:1.3.0.RELEASE:compile
[INFO] | +- org.springframework.hateoas:spring-hateoas:jar:0.19.0.RELEASE:compile
[INFO] | | \- org.slf4j:slf4j-api:jar:1.7.13:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.6.3:compile
[INFO] | +- org.projectlombok:lombok:jar:1.16.2:compile
[INFO] | +- net.sf.dozer:dozer:jar:5.5.1:compile
[INFO] | +- com.datastax.cassandra:cassandra-driver-dse:jar:2.1.6:compile
[INFO] | +- com.datastax.cassandra:cassandra-driver-mapping:jar:2.1.4:compile
[INFO] | +- com.stratio.cassandra:cassandra-lucene-index-builder:jar:2.2.4.0:compile
[INFO] | +- org.apache.httpcomponents:httpclient:jar:4.5.1:compile
[INFO] | | \- org.apache.httpcomponents:httpcore:jar:4.4.1:compile
[INFO] | +- com.google.guava:guava:jar:18.0:compile
[INFO] | +- com.netflix.archaius:archaius-core:jar:0.6.5:compile
[INFO] | | +- com.fasterxml.jackson.core:jackson-core:jar:2.6.3:compile
[INFO] | | \- com.google.code.findbugs:annotations:jar:2.0.0:compile
[INFO] | +- commons-configuration:commons-configuration:jar:1.8:compile
[INFO] | | \- commons-lang:commons-lang:jar:2.6:compile
[INFO] | +- com.ecwid.consul:consul-api:jar:1.1.6:compile
[INFO] | | \- com.google.code.gson:gson:jar:2.3.1:compile
[INFO] | +- org.springframework.cloud:spring-cloud-context:jar:1.0.2.RELEASE:compile
[INFO] | | \- org.springframework.security:spring-security-crypto:jar:3.2.7.RELEASE:compile
[INFO] | +- org.springframework.cloud:spring-cloud-commons:jar:1.0.2.RELEASE:compile
[INFO] | +- com.netflix.ribbon:ribbon:jar:2.1.0:compile
[INFO] | | +- com.netflix.ribbon:ribbon-core:jar:2.1.0:compile
[INFO] | | +- com.netflix.ribbon:ribbon-transport:jar:2.1.0:runtime
[INFO] | | | +- io.reactivex:rxnetty-contexts:jar:0.4.9:runtime
[INFO] | | | \- io.reactivex:rxnetty-servo:jar:0.4.9:runtime
[INFO] | | +- com.netflix.hystrix:hystrix-core:jar:1.4.4:compile
[INFO] | | +- javax.inject:javax.inject:jar:1:runtime
[INFO] | | \- io.reactivex:rxnetty:jar:0.4.9:runtime
[INFO] | | +- io.netty:netty-codec-http:jar:4.0.27.Final:runtime
[INFO] | | | +- io.netty:netty-codec:jar:4.0.27.Final:runtime
[INFO] | | | \- io.netty:netty-handler:jar:4.0.27.Final:runtime
[INFO] | | \- io.netty:netty-transport-native-epoll:jar:4.0.27.Final:runtime
[INFO] | +- com.netflix.ribbon:ribbon-httpclient:jar:2.1.0:compile
[INFO] | | +- commons-collections:commons-collections:jar:3.2.1:compile
[INFO] | | +- com.sun.jersey:jersey-client:jar:1.13:runtime
[INFO] | | | \- com.sun.jersey:jersey-core:jar:1.13:runtime
[INFO] | | +- com.sun.jersey.contribs:jersey-apache-client4:jar:1.11:runtime
[INFO] | | \- com.netflix.netflix-commons:netflix-commons-util:jar:0.1.1:compile
[INFO] | \- com.netflix.ribbon:ribbon-loadbalancer:jar:2.1.0:compile
[INFO] | \- com.netflix.netflix-commons:netflix-statistics:jar:0.1.1:runtime
[INFO] +- com.asadventure:customer-service-client:jar:docker-SNAPSHOT:compile
[INFO] | +- commons-logging:commons-logging:jar:1.2:compile
[INFO] | +- org.springframework:spring-beans:jar:4.2.3.RELEASE:compile
[INFO] | +- org.springframework:spring-context-support:jar:4.2.3.RELEASE:compile
[INFO] | +- org.springframework:spring-context:jar:4.2.3.RELEASE:compile
[INFO] | +- org.springframework:spring-web:jar:4.2.3.RELEASE:compile
[INFO] | +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.13:compile
[INFO] | | \- org.codehaus.jackson:jackson-core-asl:jar:1.9.12:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-hateoas:jar:1.3.0.RELEASE:compile
[INFO] | | \- org.springframework.plugin:spring-plugin-core:jar:1.2.0.RELEASE:compile
[INFO] | +- xml-apis:xml-apis:jar:1.3.02:compile
[INFO] | +- io.netty:netty-buffer:jar:4.0.27.Final:compile
[INFO] | +- io.netty:netty-transport:jar:4.0.27.Final:compile
[INFO] | +- io.reactivex:rxjava:jar:1.0.4:compile
[INFO] | +- io.netty:netty-common:jar:4.0.27.Final:compile
[INFO] | +- com.netflix.servo:servo-core:jar:0.7.5:compile
[INFO] | +- org.springframework.cloud:spring-cloud-consul-config:jar:1.0.0.M4:compile
[INFO] | \- org.springframework.cloud:spring-cloud-consul-discovery:jar:1.0.0.M4:compile
[INFO] | \- org.springframework.cloud:spring-cloud-consul-core:jar:1.0.0.M4:compile
[INFO] +- com.asadventure:wso2-filter:jar:abeq-SNAPSHOT:compile
[INFO] | \- org.springframework.ws:spring-ws-core:jar:2.2.3.RELEASE:compile
[INFO] | +- org.springframework.ws:spring-xml:jar:2.2.3.RELEASE:compile
[INFO] | \- org.springframework:spring-oxm:jar:4.1.6.RELEASE:compile
[INFO] +- com.vaadin:vaadin-server:jar:7.6.0:compile
[INFO] | +- com.vaadin:vaadin-sass-compiler:jar:0.9.13:compile
[INFO] | | +- org.w3c.css:sac:jar:1.3:compile
[INFO] | | +- com.vaadin.external.flute:flute:jar:1.3.0.gg2:compile
[INFO] | | \- com.yahoo.platform.yui:yuicompressor:jar:2.4.8:compile
[INFO] | | \- rhino:js:jar:1.7R2:compile
[INFO] | +- com.vaadin:vaadin-shared:jar:7.6.0:compile
[INFO] | | +- com.vaadin.external.streamhtmlparser:streamhtmlparser-jsilver:jar:0.0.10.vaadin1:compile
[INFO] | | \- com.vaadin.external.google:guava:jar:16.0.1.vaadin1:compile
[INFO] | \- org.jsoup:jsoup:jar:1.8.3:compile
[INFO] +- com.vaadin:vaadin-client-compiled:jar:7.6.0:compile
[INFO] +- com.vaadin:vaadin-spring-boot-starter:jar:1.0.0:compile
[INFO] | +- com.vaadin:vaadin-spring-boot:jar:1.0.0:compile
[INFO] | | \- com.vaadin:vaadin-spring:jar:1.0.0:compile
[INFO] | \- com.vaadin:vaadin-themes:jar:7.6.0:compile
[INFO] +- org.vaadin:viritin:jar:1.39:compile
[INFO] | +- org.vaadin.addon:confirmdialog:jar:2.1.3:compile
[INFO] | +- org.commonjava.googlecode.markdown4j:markdown4j:jar:2.2-cj-1.0:compile
[INFO] | +- commons-io:commons-io:jar:1.3.2:compile
[INFO] | +- commons-beanutils:commons-beanutils:jar:1.9.2:compile
[INFO] | +- org.apache.commons:commons-lang3:jar:3.3.2:compile
[INFO] | \- javax.el:javax.el-api:jar:2.2.4:compile
[INFO] +- com.vaadin:grid-renderers-collection-addon:jar:0.92:compile
[INFO] +- de.datenhahn.vaadin:componentrenderer:jar:0.1.1:compile
[INFO] | \- cglib:cglib:jar:3.2.0:compile
[INFO] | +- org.ow2.asm:asm:jar:5.0.3:compile
[INFO] | \- org.apache.ant:ant:jar:1.9.4:compile
[INFO] | \- org.apache.ant:ant-launcher:jar:1.9.4:compile
[INFO] +- org.springframework.boot:spring-boot-starter-data-jpa:jar:1.3.0.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-aop:jar:1.3.0.RELEASE:compile
[INFO] | | \- org.aspectj:aspectjweaver:jar:1.8.7:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-jdbc:jar:1.3.0.RELEASE:compile
[INFO] | | +- org.apache.tomcat:tomcat-jdbc:jar:8.0.28:compile
[INFO] | | | \- org.apache.tomcat:tomcat-juli:jar:8.0.28:compile
[INFO] | | \- org.springframework:spring-jdbc:jar:4.2.3.RELEASE:compile
[INFO] | +- org.hibernate:hibernate-entitymanager:jar:4.3.6.Final:compile
[INFO] | | +- org.jboss.logging:jboss-logging:jar:3.3.0.Final:compile
[INFO] | | +- org.jboss.logging:jboss-logging-annotations:jar:1.2.0.Beta1:compile
[INFO] | | +- org.hibernate:hibernate-core:jar:4.3.6.Final:compile
[INFO] | | | +- antlr:antlr:jar:2.7.7:compile
[INFO] | | | \- org.jboss:jandex:jar:1.1.0.Final:compile
[INFO] | | +- dom4j:dom4j:jar:1.6.1:compile
[INFO] | | +- org.hibernate.common:hibernate-commons-annotations:jar:4.0.5.Final:compile
[INFO] | | +- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:jar:1.0.0.Final:compile
[INFO] | | \- org.javassist:javassist:jar:3.18.1-GA:compile
[INFO] | +- javax.transaction:javax.transaction-api:jar:1.2:compile
[INFO] | +- org.springframework.data:spring-data-jpa:jar:1.9.1.RELEASE:compile
[INFO] | | +- org.springframework.data:spring-data-commons:jar:1.11.1.RELEASE:compile
[INFO] | | +- org.springframework:spring-orm:jar:4.2.3.RELEASE:compile
[INFO] | | \- org.springframework:spring-tx:jar:4.2.3.RELEASE:compile
[INFO] | \- org.springframework:spring-aspects:jar:4.1.6.RELEASE:compile
[INFO] +- com.microsoft.sqlserver:sqljdbc4:jar:3.0:compile
[INFO] +- junit:junit:jar:4.12:test
[INFO] | \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- org.springframework:spring-test:jar:4.1.6.RELEASE:test
[INFO] | \- org.springframework:spring-core:jar:4.2.3.RELEASE:compile
[INFO] +- org.springframework.security:spring-security-web:jar:4.0.3.RELEASE:compile
[INFO] | +- aopalliance:aopalliance:jar:1.0:compile
[INFO] | +- org.springframework.security:spring-security-core:jar:4.0.3.RELEASE:compile
[INFO] | \- org.springframework:spring-expression:jar:4.1.6.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter:jar:1.3.0.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-autoconfigure:jar:1.3.0.RELEASE:compile
[INFO] | \- org.yaml:snakeyaml:jar:1.16:compile
[INFO] \- org.springframework.boot:spring-boot-starter-log4j2:jar:1.2.3.RELEASE:compile
[INFO] +- org.slf4j:jcl-over-slf4j:jar:1.7.13:compile
[INFO] +- org.slf4j:jul-to-slf4j:jar:1.7.13:compile
[INFO] +- org.apache.logging.log4j:log4j-slf4j-impl:jar:2.4.1:compile
[INFO] +- org.apache.logging.log4j:log4j-api:jar:2.4.1:compile
[INFO] \- org.apache.logging.log4j:log4j-core:jar:2.4.1:compile
У нас уже есть Кассандры БД работает, и это будет добавить MSSQL БД. Коллега отметил он пытается Кассандры вместо MSSQL:
Caused by: java.lang.AbstractMethodError: org.springframework.data.repository.core.support.RepositoryFactorySupport.getTargetRepository(Lorg/springframework/data/repository/core/RepositoryInformation;)Ljava/lang/Object;
at org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:185) ~[spring-data-commons-1.11.1.RELEASE.jar:?]
at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.initAndReturn(RepositoryFactoryBeanSupport.java:251) ~[spring-data-commons-1.11.1.RELEASE.jar:?]
at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.afterPropertiesSet(RepositoryFactoryBeanSupport.java:237) ~[spring-data-commons-1.11.1.RELEASE.jar:?]
at org.springframework.data.cassandra.repository.support.CassandraRepositoryFactoryBean.afterPropertiesSet(CassandraRepositoryFactoryBean.java:62) ~[spring-data-cassandra-1.1.2.RELEASE.jar:?]
Можете ли вы разместить весь POM? Вы определили какие-либо свойства с номерами версий? Также будет полезен вывод 'mvn dependency: tree'. – dunni
Мы продолжаем от родительского помпы, поэтому в текущем нет никаких версий. Я добавил дерево зависимостей, хотя! – Daemun
Для начала прекратите смешивать пружинные версии ... У вас есть классы 4.1.6 и 4.2.3, которые не будут работать (вы также смешиваете загрузку 1.2.3 и 1.3.0). Убедитесь, что вы используете соответствующие версии для загрузки Spring. (Также задаемся вопросом, почему вы вручную настраиваете entitymanagerfactory вместо использования автоматической настройки? Нет ничего, что вы настраиваете, который не настроен автоматически? –