fix: 放行文档

This commit is contained in:
2026-01-08 00:50:12 +08:00
parent 4a4a010f83
commit 9a20a52afb
3 changed files with 3 additions and 7 deletions

View File

@@ -27,7 +27,7 @@ public class SecurityConfiguration {
.sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
.authorizeHttpRequests(auth -> auth
.requestMatchers("/v1/auth/**", "/oauth2/**", "/.well-known/**", "/doc.html", "/swagger-ui/**",
"/swagger-resources/**", "/webjars/**", "/v3/api-docs/**", "/favicon.ico")
"/swagger-resources/**", "/webjars/**", "/v3/api-docs/**", "/v3/api-docs", "/favicon.ico")
.permitAll()
.anyRequest()
.authenticated())

View File

@@ -99,7 +99,8 @@ public class JwtAuthenticationFilter extends OncePerRequestFilter {
// 跳过不需要JWT验证的路径
return path.startsWith("/v1/auth/") || path.startsWith("/doc.html") || path.startsWith("/swagger-ui/")
|| path.startsWith("/swagger-resources/") || path.startsWith("/webjars/")
|| path.startsWith("/v3/api-docs/") || path.equals("/favicon.ico");
|| path.startsWith("/v3/api-docs") || path.equals("/favicon.ico")
|| path.contains("/v3/api-docs");
}
}

View File

@@ -2,7 +2,6 @@ package cn.meowrain.backend.common.mybaits.base;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
@@ -23,28 +22,24 @@ public class BaseEntity implements Serializable {
/**
* 创建者
*/
@Schema(description = "创建人")
@TableField(fill = FieldFill.INSERT)
private String createBy;
/**
* 创建时间
*/
@Schema(description = "创建时间")
@TableField(fill = FieldFill.INSERT)
private LocalDateTime createTime;
/**
* 更新者
*/
@Schema(description = "更新人")
@TableField(fill = FieldFill.INSERT_UPDATE)
private String updateBy;
/**
* 更新时间
*/
@Schema(description = "更新时间")
@TableField(fill = FieldFill.INSERT_UPDATE)
private LocalDateTime updateTime;