Вот моя зависимость:
Код: Выделить всё
org.springdoc
springdoc-openapi-starter-webmvc-ui
2.2.0
Код: Выделить всё
public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception {
httpSecurity
.authorizeHttpRequests(authorizeRequests ->
authorizeRequests
.requestMatchers(HttpMethod.POST, PUBLIC_POST_ENDPOINTS).permitAll()
.requestMatchers("/authenticate",
"/swagger-ui/**",
"/swagger-resources/*",
"/v3/api-docs/**",
"/swagger-config",
"/api-docs",
"/api/v1/app/user/auth/").permitAll()
.anyRequest().authenticated()
)
.csrf(AbstractHttpConfigurer::disable);
httpSecurity.oauth2ResourceServer(oauth2ResourceServer ->
oauth2ResourceServer.jwt(jwtConfigurer -> jwtConfigurer.decoder(jwtDecoder())));
return httpSecurity.build();
}
Код: Выделить всё
spring.mvc.pathmatch.matching-strategy = ANT_PATH_MATCHER
springdoc.api-docs.path=/api-docs
Пожалуйста, скажите мне, в чем здесь проблема
Подробнее здесь: https://stackoverflow.com/questions/790 ... -authorize
Мобильная версия