x1c 0d1x我在中获取未解决的错误
@EnableWebFluxSecurity、springSecurityFilterChain、.csrf()、ServerHttpSecurity和.pathMatchers()
这些是pom.xml中的依赖项
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-gateway</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-oauth2-resource-server</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
</dependencies>
字符串
1条答案
按热度按时间u4vypkhs1#
在最新版本的spring Boot 3.1.1**@EnableWebFluxSecurity中,springSecurityFilterChain,.csrf(),ServerHttpSecurity和.pathMatchers()**已弃用,因此您必须更改代码。
如果你使用的是spring Boot 3,可以参考以下代码:
字符串
CustomAuthenticationManager:
型