Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/363.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 创建在类路径资源中定义了名为“sessionRepositoryFilterRegistration”的bean时出错_Java_Spring_Jpa_Gradle_Entity - Fatal编程技术网

Java 创建在类路径资源中定义了名为“sessionRepositoryFilterRegistration”的bean时出错

Java 创建在类路径资源中定义了名为“sessionRepositoryFilterRegistration”的bean时出错,java,spring,jpa,gradle,entity,Java,Spring,Jpa,Gradle,Entity,执行spring后发生错误。请告诉我怎么修。 我需要你的帮助 错误 build.gradle contentsbuild.gradle contentsbuild.gradle contentsbuild.gradle contentsbuild.gradle contentsbuild.gradle contentsbuild.gradle contentsbuild.gradle contentsbuild.gradle contentsbuild.gradle contentsbuild.

执行spring后发生错误。请告诉我怎么修。 我需要你的帮助

错误

build.gradle contentsbuild.gradle contentsbuild.gradle contentsbuild.gradle contentsbuild.gradle contentsbuild.gradle contentsbuild.gradle contentsbuild.gradle contentsbuild.gradle contentsbuild.gradle contentsbuild.gradle contents

buildscript {

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

apply plugin: 'java'

apply plugin: 'eclipse'

apply plugin: 'org.springframework.boot'


group = 'com.example'

version = '0.0.1-SNAPSHOT'

sourceCompatibility = 1.8

repositories {

    mavenCentral()

    maven {

        url 'https://jitpack.io'

    }
}

dependencies {
    compile group: 'mysql', name: 'mysql-connector-java', version: '5.1.46'

    compile('org.springframework.boot:spring-boot-starter-data-jpa:2.0.0.RELEASE')
    compile('org.springframework.boot:spring-boot-starter-web:2.0.0.RELEASE')
    compile('javax.validation:validation-api:2.0.0.Final')
    compile('org.apache.commons:commons-lang3:3.6')
    compile group: 'org.hibernate', name: 'hibernate-core', version: '5.2.14.Final'
    compile files('lib/gsf-3.0.jar')

    // new
    compile ('com.voodoodyne.jackson.jsog:jackson-jsog:1.0')
    compile('org.springframework.boot:spring-boot-starter-security:2.0.0.RELEASE')
    compile('org.springframework.boot:spring-boot-starter-thymeleaf:2.0.0.RELEASE')
    compile('nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect:2.3.0')
    compile ('com.google.guava:guava:23.3-jre')
    compile('org.springframework.session:spring-session:1.3.1.RELEASE')
    compile('org.springframework.session:spring-session-data-redis:1.3.1.RELEASE')
    compile('org.glassfish:javax.el:3.0.1-b08')
    compile("com.querydsl:querydsl-core:4.1.4")
    compile("com.querydsl:querydsl-jpa:4.1.4")
    compile("com.querydsl:querydsl-apt:4.1.4")
    compile('org.springframework.data:spring-data-redis:2.0.5.RELEASE')
    compile('org.springframework.data:spring-data-jpa:2.0.5.RELEASE')
    compile('org.springframework.security.oauth:spring-security-oauth2:2.3.3.RELEASE')

    compile('org.springframework.security:spring-security-core:5.0.3.RELEASE')
    compile('com.squareup.okhttp3:okhttp:3.8.0')
    compile('com.squareup.retrofit2:retrofit:2.3.0')
    compile('com.github.iamport:iamport-rest-client-java:0.1.10')
    compile('com.alibaba:fastjson:1.2.47')
    compile ('org.json:json:20180813')
    compile ('org.apache.xmlgraphics:batik-transcoder:1.7')
    compile('org.springframework:spring-test:2.5')
    compile('commons-validator:commons-validator:1.6')

    runtime('mysql:mysql-connector-java')
    compileOnly('org.projectlombok:lombok:1.16.20')
    testCompile('org.springframework.boot:spring-boot-starter-test')
}

添加以下依赖项帮助我解决了上述问题

compile "org.springframework.session:spring-session-data-redis:2.0.3.RELEASE"

添加以下依赖项帮助我解决了上述问题

compile "org.springframework.session:spring-session-data-redis:2.0.3.RELEASE"