spring bootの@EnableJdbcHttpSessionが使えない件について
問題点
spring bootにて@EnableJdbcHttpSessionアノテーションを利用しようとしていますがimportができません.
importの記載方法, build.gradle, エラーの内容は以下になります.
java
1import org.springframework.session.jdbc.config.annotation.web.http.EnableJdbcHttpSession;
また, build.gradleには以下のように記載しております.
gradle
1plugins { 2 id 'org.springframework.boot' version '2.1.6.RELEASE' 3 id 'java' 4} 5 6apply plugin: 'io.spring.dependency-management' 7 8group = 'com.test' 9version = '0.0.1-SNAPSHOT' 10sourceCompatibility = '1.8' 11 12configurations { 13 developmentOnly 14 runtimeClasspath { 15 extendsFrom developmentOnly 16 } 17} 18 19repositories { 20 mavenCentral() 21} 22 23dependencies { 24 implementation 'org.springframework.boot:spring-boot-starter-data-jpa' 25 implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' 26 implementation 'org.springframework.boot:spring-boot-starter-web' 27 implementation 'org.springframework.security:spring-security-config' 28 implementation 'org.springframework.security:spring-security-oauth2-client' 29 implementation 'org.springframework.security:spring-security-oauth2-jose' 30 31 32 compile group: 'org.springframework.session', name: 'spring-session', version: '1.0.0.RELEASE' 33 compile group: 'org.springframework.boot', name: 'spring-boot-docs', version: '2.0.2.RELEASE' 34 implementation 'org.springframework.session:spring-session-core' 35 implementation 'org.springframework.session:spring-session-jdbc' 36 implementation 'nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect:2.3.0' 37 38 developmentOnly 'org.springframework.boot:spring-boot-devtools' 39 runtimeOnly 'com.h2database:h2' 40 runtimeOnly 'mysql:mysql-connector-java' 41 testImplementation 'org.springframework.boot:spring-boot-starter-test' 42 testImplementation 'org.springframework.security:spring-security-test' 43}
エラー内容は以下になります
% ./gradlew bootrun (git)-[addManagingSessionFunction] > Task :compileJava FAILED ./oauthApplication/src/main/java/com/OAuthApplication/OAuthApplication.java:11: エラー: シンボルを見つけられません @EnableJdbcHttpSession ^ シンボル: クラス EnableJdbcHttpSession エラー1個 FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':compileJava'. > Compilation failed; see the compiler error output for details. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 0s 1 actionable task: 1 executed
あなたの回答
tips
プレビュー