Код: Выделить всё
Caused by: java.lang.NoClassDefFoundError: javax/servlet/Filter
at java.base/java.lang.Class.getDeclaredMethods0(Native Method) ~[na:na]
...
Caused by: java.lang.ClassNotFoundException: javax.servlet.Filter
...
Код: Выделить всё
package com.trojan.loginserver.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.web.SecurityFilterChain;
import static org.springframework.security.config.Customizer.withDefaults;
@Configuration
@EnableWebSecurity
public class SecurityConfig {
@Bean
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
http
.authorizeHttpRequests(authorize -> authorize
.anyRequest().authenticated()
)
.oauth2Login(withDefaults());
return http.build();
}
}
Код: Выделить всё
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
org.springframework.boot
spring-boot-starter-parent
3.3.4
com.trojan
login-server
0.0.1-SNAPSHOT
login-server
login-server
17
org.springframework.boot
spring-boot-starter-data-jpa
org.springframework.boot
spring-boot-starter-web
org.springframework.boot
spring-boot-devtools
runtime
true
com.mysql
mysql-connector-j
runtime
org.springframework.boot
spring-boot-starter-test
test
org.mockito
mockito-core
test
io.projectreactor
reactor-test
test
org.jetbrains
annotations
RELEASE
compile
io.jsonwebtoken
jjwt
0.9.1
org.springframework.session
spring-session-core
3.2.1
org.springframework.boot
spring-boot-starter-logging
org.springframework.boot
spring-boot-starter-security
org.springframework.boot
spring-boot-starter-oauth2-client
org.springframework.boot
spring-boot-maven-plugin
com.google.cloud.tools
jib-maven-plugin
3.3.0
openjdk:17-jdk-slim
trojan2877/login-server
Кто-нибудь еще сталкивался с этой проблемой или имеет предложения по ее решению?
Ссылка на проект: GitHub Link
Заранее благодарим за любую помощь!
Подробнее здесь: https://stackoverflow.com/questions/791 ... ion-oauth2
Мобильная версия