質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
import

自身のプラットフォーム・プログラム・データセットに対して、外部ソースを取り込むプロセスをimportと呼びます。

アノテーション

アノテーションとは、特定のコードに対して、メタデータを注釈として付与することを指します。また、付与したメタデータ自体をアノテーションと呼ぶ場合もあります。

Gradle

Gradleは、ビルド自動化ツールです。 ソフトウェアパッケージやドキュメント、 または実際に何か他の種類のプロジェクトの構築、テスト、公開、展開などを自動化が出来ます

Spring Boot

Spring Bootは、Javaのフレームワークの一つ。Springプロジェクトが提供する様々なフレームワークを統合した、アプリケーションを高速で開発するために設計されたフレームワークです。

Q&A

0回答

2019閲覧

spring bootの@EnableJdbcHttpSessionが使えない件について

1gakiRikuya.

総合スコア10

import

自身のプラットフォーム・プログラム・データセットに対して、外部ソースを取り込むプロセスをimportと呼びます。

アノテーション

アノテーションとは、特定のコードに対して、メタデータを注釈として付与することを指します。また、付与したメタデータ自体をアノテーションと呼ぶ場合もあります。

Gradle

Gradleは、ビルド自動化ツールです。 ソフトウェアパッケージやドキュメント、 または実際に何か他の種類のプロジェクトの構築、テスト、公開、展開などを自動化が出来ます

Spring Boot

Spring Bootは、Javaのフレームワークの一つ。Springプロジェクトが提供する様々なフレームワークを統合した、アプリケーションを高速で開発するために設計されたフレームワークです。

0グッド

0クリップ

投稿2019/09/08 07:51

編集2022/01/12 10:55

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

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

退会済みユーザー

退会済みユーザー

2019/09/08 08:21

Spring Boot は 1系と2系は結構違いますが ちゃんと確認してますか?
1gakiRikuya.

2019/09/08 08:21

申し訳ございません. 自己解決することができました.
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問