2017-07-12 9 views
0

私はspringbootとhibernate-search-ormを使いたいが、コンパイルするプロジェクトを手に入れることはできない。springboot 1.5.2 + hibernate-search-orm

私はそれがハイバーネーションバージョン間の互換性の問題のためだと思いますか?

私はGradleとIntellij Ideaを使用しています。私は私のビルドに追加しているので、私は休止状態-検索-ORMはspringbootの一部であるとは思わない

build.gradle

buildscript { 
ext { 
    springBootVersion = '1.5.2.RELEASE' 
} 
repositories { 
    mavenCentral() 
} 
dependencies { 
    classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") 
} 
} 

ext["thymeleaf.version"] = "3.0.2.RELEASE" 
ext["thymeleaf-layout-dialect.version"] = "2.0.1" 

apply plugin: 'java' 
apply plugin: 'eclipse' 
apply plugin: 'org.springframework.boot' 

version = '0.0.5-SNAPSHOT' 
sourceCompatibility = 1.8 

repositories { 
    mavenCentral() 
} 
dependencies { 
    compile('org.springframework.boot:spring-boot-starter-data-jpa') 
    compile('org.springframework.boot:spring-boot-starter-jdbc') 
    compile('org.springframework.boot:spring-boot-starter-thymeleaf') 
    compile('org.springframework.boot:spring-boot-starter-web') 
    compile 'org.springframework.boot:spring-boot-starter-security' 

    compile ("org.thymeleaf.extras:thymeleaf-extras-springsecurity4:3.0.0.RELEASE") 

    compile group: 'org.springframework.boot', name: 'spring-boot-starter-logging', version: '1.5.2.RELEASE' 
    compile group: 'org.thymeleaf.extras', name: 'thymeleaf-extras-springsecurity4', version: '2.1.2.RELEASE' 
    compile group: 'org.springframework.boot', name: 'spring-boot-autoconfigure', version: '1.5.2.RELEASE' 

    compile group: 'org.hibernate', name: 'hibernate-search-orm', 

    version: '5.1.0.Final' 

     compile("org.springframework.boot:spring-boot-devtools") 
     compile('mysql:mysql-connector-java') 
     testCompile('org.springframework.boot:spring-boot-starter-test') 
    } 

     bootRun { 
      addResources = true 
     } 

そして、私は

5:40:30 PM: Executing external task 'build'... 
C:\Users\Owner\IdeaProjects\test\src\main\java\com\example\controllers\planController.java:27: warning: sym is internal proprietary API and may be removed in a future release 
import static com.sun.org.apache.xalan.internal.xsltc.compiler.sym.error; 
                  ^
Note: Some input files use unchecked or unsafe operations. 
Note: Recompile with -Xlint:unchecked for details. 
1 warning 
:compileJava 
:processResources UP-TO-DATE 
:classes 
:findMainClass 
:jar 
:bootRepackage 
:assemble 
:compileTestJava UP-TO-DATE 
:processTestResources UP-TO-DATE 
:testClasses UP-TO-DATE 
:test 

com.example.Demo3ApplicationTests > contextLoads FAILED 
    java.lang.IllegalStateException 
     Caused by: org.springframework.beans.factory.BeanCreationException 
      Caused by: java.lang.AbstractMethodError 

1 test completed, 1 failed 
:test FAILED 

FAILURE: Build failed with an exception. 

* What went wrong: 
Execution failed for task ':test'. 
> There were failing tests. See the report at: file:///C:/Users/Owner/IdeaProjects/test/build/reports/tests/test/index.html 

* Try: 
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. 

BUILD FAILED 

Total time: 23.392 secs 
There were failing tests. See the report at: file:///C:/Users/Owner/IdeaProjects/test/build/reports/tests/test/index.html 
5:40:54 PM: External task execution finished 'build'. 

を構築、実行出力.gradleファイルを明示的に。あなたが使用している依存関係のバージョンを指定する必要が

Error handling failed (Error creating bean with name 'delegatingApplicationListener' defined in class path resource [org/springframework/security/config/annotation/web/configuration/WebSecurityConfiguration.class]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration': Initialization of bean failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importRegistry' available) 
+0

この記事をチェックし、正しく設定する方法を説明します。 https://blog.stefanproell.at/2017/03/12/using-hibernate-search-with-spring-boot/ – bpjoshi

答えて

0

:私は私のプロジェクトを実行しようとした場合

は、ルートエラーがあるように思われます。そして、彼らはお互いに互換性がある必要があります。https://mvnrepository.comまで行って、あなたの春のブートバージョンを見つけて、依存関係のコンパイルをチェックしてください。他のすべての依存関係を使用してください。

+0

このリンクは質問に答えるかもしれませんが、回答の重要な部分をここに含めてください。参照のためのリンクを提供する。リンクされたページが変更された場合、リンクのみの回答は無効になります。 - [レビューから](/レビュー/低品質の投稿/ 17686413) –

関連する問題