增加websocket

This commit is contained in:
2025-08-08 20:12:46 +08:00
parent 411b7d69d3
commit 503b44d92d
17 changed files with 391 additions and 55 deletions

View File

@@ -25,6 +25,8 @@ public class SecurityConfig {
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
http.csrf(csrf -> csrf.disable())
.authorizeHttpRequests(auth -> auth
.requestMatchers("/ws/**").permitAll()
.requestMatchers("/api/ws/**", "/topic/**").permitAll()
.requestMatchers("/public/**").permitAll()
.requestMatchers("/admin/**").hasRole("ADMIN")
// .requestMatchers("/user/**").hasAnyRole("USER", "ADMIN")