我想在我的项目中增加一些额外的安全措施。
但是当我实现它时,它是错误的:
无法解决org.thymeleaf.extras:thymeleaf-extras-springsecurity5:2.1.3.RELEASE.无法解析com.imbusds:OAuth2-oidc-SDK:9.38.1。
我的build.gradle文件:
plugins {
id 'org.springframework.boot' version '3.0.0-SNAPSHOT'
id 'io.spring.dependency-management' version '1.0.12.RELEASE'
id 'java'
}
group = 'ru.arisu'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '17'
repositories {
mavenCentral()
maven { url 'https://repo.spring.io/milestone' }
maven { url 'https://repo.spring.io/snapshot' }
maven { url 'https://repo.spring.io/libs-release'}
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
implementation 'org.springframework.boot:spring-boot-starter-web'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
implementation 'org.springframework.boot:spring-boot-starter-jdbc'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
runtimeOnly 'org.postgresql:postgresql:42.3.1'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.security:spring-security-oauth2-client'
implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity5:2.1.3.RELEASE'
}
tasks.named('test') {
useJUnitPlatform()
}发布于 2022-07-21 16:40:13
Thymeleaf Extras Security 5与Security 6不兼容,您应该使用Thymeleaf Extras Security 6。
请记住,您使用的是Spring :3.0.0-快照的快照版本,这意味着它至少需要JDK 17。
https://stackoverflow.com/questions/73069672
复制相似问题