Q&A
Spring Security&Thymeleafで認証・認可を参考にログイン処理を作成しています。
その中で、templateresolverがインポートできていないというエラーが発生してしまっています。(以下、エラー画面)
解決したいこと
templateresolverを正常にインポートしたい。
templateresolverが含まれているはずのライブラリ「org.thymeleaf:thymeleaf:3.0.11.RELEASE」はbuile.gradleへ記入しておりビルドエラー等も出ていません。リフレッシュを何回してもtemplateresolverのみエラーとなります。追加で何かライブラリを入れる必要があるのでしょうか。
以下、エラー画面とbuild.gradle
build
1buildscript { 2 ext { 3 springBootVersion = '2.1.0.RELEASE' 4 } 5 repositories { 6 mavenCentral() 7 } 8 dependencies { 9 classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") 10 } 11} 12 13apply plugin: 'java' 14apply plugin: 'eclipse' 15apply plugin: 'org.springframework.boot' 16apply plugin: 'io.spring.dependency-management' 17 18group = 'com.Sample' 19version = '0.0.1-SNAPSHOT' 20sourceCompatibility = 1.8 21 22repositories { 23 mavenCentral() 24} 25 26 27dependencies { 28 implementation('org.springframework.boot:spring-boot-starter-data-jpa') 29 implementation('org.springframework.boot:spring-boot-starter-thymeleaf') 30 implementation('org.springframework.boot:spring-boot-starter-web') 31 runtimeOnly('org.postgresql:postgresql') 32 testImplementation('org.springframework.boot:spring-boot-starter-test') 33 compile('org.springframework.security:spring-security-web') 34 compile('org.springframework.security:spring-security-config') 35 compile("org.springframework.boot:spring-boot-starter-security:1.4.1.RELEASE") 36 compile("org.thymeleaf.extras:thymeleaf-extras-springsecurity4:2.1.3.RELEASE") 37 compile("org.springframework.security:spring-security-core:4.2.3.RELEASE") 38 compile("org.springframework.security:spring-security-web:4.2.3.RELEASE") 39 compile("org.springframework.security:spring-security-config:4.2.3.RELEASE") 40 compile("org.thymeleaf:thymeleaf-spring4:3.0.1.RELEASE") 41 compile("org.thymeleaf:thymeleaf:3.0.11.RELEASE") 42 43} 44
なにか足りない手順があるようでしたらご教授お願い致します。
■バージョン情報
STS:sts-4.0.1.RELEASE
java:jdk1.8.0_191
回答1件
下記のような回答は推奨されていません。
このような回答には修正を依頼しましょう。
2018/11/22 02:36