Hibernate 5에서 실행되는 SpringBoot 응용 프로그램을 가져 오기 위해 java.util.Date를 사용하는 대신 Java LocalDate 변경 사항을 활용하려고합니다.). 내 SpringBoot 응용 프로그램을 실행할 때 (IDE 캐싱 등)가 제대로 종속 로딩을 받고 몇 가지 불행한 문제 후LocalContainerEntityManagerFactoryBean.setPersistenceUnitRootLocation이 Spring-Boot 1.4.1에서 제거되었습니다.
dependencies {
compile("org.springframework.boot:spring-boot-starter-web:1.4.1.RELEASE")
compile("org.springframework.boot:spring-boot-starter-data-jpa:1.4.1.RELEASE")
compile("org.springframework.boot:spring-boot-starter-freemarker':1.4.1.RELEASE")
compile group: 'com.h2database', name: 'h2', version:'1.4.191'
compile group: 'org.apache.commons', name: 'commons-lang3', version:'3.1'
compile group: 'org.sitemesh', name: 'sitemesh', version:'3.0.1'
:
는 새로운 최대 절전 모드를 얻으려면 내 Gradle을 파일에 봄 1.4.1.RELEASE로 이동
2016-10-25 10:40:36.798 ERROR 7448 --- [ main] o.s.boot.SpringApplication : Application startup failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean]: Factory method 'entityManagerFactory' threw exception; nested exception is java.lang.NoSuchMethodError:
org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.setPersistenceUnitRootLocation(Ljava/lang/String;)V
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) ~[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1128) ~[spring-beans-4.3.3.RELEASE.jar:4.3.3.RELEASE]
좀 라이브러리 중 하나가 제대로 업데이트되지 않았 음을 의심하고 있습니다 또는 내 의존성에서 뭔가 빠진 해요 : 나는 다음과 같은 오류가 발생합니다.
여러 개의 정리/설치/업데이트/캐시 지우기 사이클을 거치면서 결국 문제가 해결되었습니다. 정확히 무엇을 고쳤는지 확실하지 않습니다! 어떤 이유로 든 빌드 프로세스에서 라이브러리의 버전을 변경하고 최신/이전 버전이 적절하게 대체되지 않았거나 IDE가 다른 버전의 gradle 파일을 참조하도록 변경 한 결과로 판단됩니다. – DaFoot