Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
basic-api-boot
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-api-boot
Commits
f3d72ae9
提交
f3d72ae9
authored
5月 17, 2025
作者:
方治民
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: upgrade deps(SpringBoot v3.4.5)
上级
b06b5afb
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
27 行增加
和
38 行删除
+27
-38
build.gradle
build.gradle
+16
-15
SaTokenConfigure.java
...rc/main/java/com/yiring/auth/config/SaTokenConfigure.java
+11
-0
SaTokenContextByPatternsRequestCondition.java
...auth/config/SaTokenContextByPatternsRequestCondition.java
+0
-23
没有找到文件。
build.gradle
浏览文件 @
f3d72ae9
...
@@ -2,14 +2,14 @@ plugins {
...
@@ -2,14 +2,14 @@ plugins {
id
'java'
id
'java'
id
'java-library'
id
'java-library'
// https://start.spring.io
// https://start.spring.io
id
'org.springframework.boot'
version
'3.4.
3
'
id
'org.springframework.boot'
version
'3.4.
5
'
id
'org.graalvm.buildtools.native'
version
'0.10.
5
'
id
'org.graalvm.buildtools.native'
version
'0.10.
6
'
// https://plugins.gradle.org/plugin/io.spring.dependency-management
// https://plugins.gradle.org/plugin/io.spring.dependency-management
id
'io.spring.dependency-management'
version
'1.1.7'
id
'io.spring.dependency-management'
version
'1.1.7'
// https://plugins.gradle.org/plugin/com.diffplug.spotless
// https://plugins.gradle.org/plugin/com.diffplug.spotless
id
"com.diffplug.spotless"
version
"7.0.
2
"
id
"com.diffplug.spotless"
version
"7.0.
3
"
// https://plugins.gradle.org/plugin/com.gorylenko.gradle-git-properties
// https://plugins.gradle.org/plugin/com.gorylenko.gradle-git-properties
id
"com.gorylenko.gradle-git-properties"
version
"2.
4.2
"
id
"com.gorylenko.gradle-git-properties"
version
"2.
5.0
"
}
}
ext
{
ext
{
...
@@ -25,35 +25,35 @@ ext {
...
@@ -25,35 +25,35 @@ ext {
// SpringCloud
// SpringCloud
// https://start.spring.io/
// https://start.spring.io/
springCloudVersion
=
'2024.0.
0
'
springCloudVersion
=
'2024.0.
1
'
// SpringBootAdmin
// SpringBootAdmin
// https://central.sonatype.com/artifact/de.codecentric/spring-boot-admin-starter-server
// https://central.sonatype.com/artifact/de.codecentric/spring-boot-admin-starter-server
springBootAdminVersion
=
'3.4.
3
'
springBootAdminVersion
=
'3.4.
5
'
// Sentry
// Sentry
// https://central.sonatype.com/artifact/io.sentry/sentry-spring-boot-starter-jakarta
// https://central.sonatype.com/artifact/io.sentry/sentry-spring-boot-starter-jakarta
sentryVersion
=
'8.2.0'
sentryVersion
=
'8.
1
2.0'
// Dependencies
// Dependencies
// https://central.sonatype.com/artifact/com.github.xiaoymin/knife4j-openapi3-jakarta-spring-boot-starter
// https://central.sonatype.com/artifact/com.github.xiaoymin/knife4j-openapi3-jakarta-spring-boot-starter
knife4jOpen3Version
=
'4.5.0'
knife4jOpen3Version
=
'4.5.0'
// https://central.sonatype.com/artifact/io.swagger.core.v3/swagger-annotations
// https://central.sonatype.com/artifact/io.swagger.core.v3/swagger-annotations
swaggerAnnotationsVersion
=
'2.2.
28
'
swaggerAnnotationsVersion
=
'2.2.
32
'
// https://central.sonatype.com/artifact/cn.dev33/sa-token-spring-boot3-starter
// https://central.sonatype.com/artifact/cn.dev33/sa-token-spring-boot3-starter
saTokenVersion
=
'1.4
0
.0'
saTokenVersion
=
'1.4
3
.0'
// https://central.sonatype.com/artifact/cn.hutool/hutool-core
// https://central.sonatype.com/artifact/cn.hutool/hutool-core
hutoolVersion
=
'5.8.3
6
'
hutoolVersion
=
'5.8.3
8
'
// https://central.sonatype.com/artifact/com.alibaba.fastjson2/fastjson2
// https://central.sonatype.com/artifact/com.alibaba.fastjson2/fastjson2
fastJsonVersion
=
'2.0.5
6
'
fastJsonVersion
=
'2.0.5
7
'
// https://central.sonatype.com/artifact/com.xuxueli/xxl-job-core
// https://central.sonatype.com/artifact/com.xuxueli/xxl-job-core
xxlJobVersion
=
'3.
0
.0'
xxlJobVersion
=
'3.
1
.0'
// https://central.sonatype.com/artifact/io.minio/minio
// https://central.sonatype.com/artifact/io.minio/minio
minioVersion
=
'8.5.17'
minioVersion
=
'8.5.17'
// https://central.sonatype.com/artifact/io.hypersistence/hypersistence-utils-hibernate-63
// https://central.sonatype.com/artifact/io.hypersistence/hypersistence-utils-hibernate-63
hibernateTypesVersion
=
'3.9.
2
'
hibernateTypesVersion
=
'3.9.
10
'
// https://central.sonatype.com/artifact/org.hibernate.orm/hibernate-spatial
// https://central.sonatype.com/artifact/org.hibernate.orm/hibernate-spatial
hibernateSpatialVersion
=
'6.6.
9
.Final'
hibernateSpatialVersion
=
'6.6.
15
.Final'
// https://central.sonatype.com/artifact/org.locationtech.jts/jts-core
// https://central.sonatype.com/artifact/org.locationtech.jts/jts-core
jtsVersion
=
'1.20.0'
jtsVersion
=
'1.20.0'
// https://mvnrepository.com/artifact/org.n52.jackson/jackson-datatype-jts
// https://mvnrepository.com/artifact/org.n52.jackson/jackson-datatype-jts
...
@@ -63,7 +63,7 @@ ext {
...
@@ -63,7 +63,7 @@ ext {
// https://central.sonatype.com/artifact/org.jetbrains/annotations
// https://central.sonatype.com/artifact/org.jetbrains/annotations
jetbrainsAnnotationsVersion
=
'26.0.2'
jetbrainsAnnotationsVersion
=
'26.0.2'
// https://central.sonatype.com/artifact/org.apache.pdfbox/pdfbox
// https://central.sonatype.com/artifact/org.apache.pdfbox/pdfbox
pdfboxVersion
=
'3.0.
4
'
pdfboxVersion
=
'3.0.
5
'
// https://central.sonatype.com/artifact/org.lionsoul/ip2region
// https://central.sonatype.com/artifact/org.lionsoul/ip2region
ip2regionVersion
=
'2.7.0'
ip2regionVersion
=
'2.7.0'
// https://central.sonatype.com/artifact/com.github.piomin/loki-logging-spring-boot-starter
// https://central.sonatype.com/artifact/com.github.piomin/loki-logging-spring-boot-starter
...
@@ -139,6 +139,7 @@ subprojects {
...
@@ -139,6 +139,7 @@ subprojects {
// skip Test tasks
// skip Test tasks
gradle
.
taskGraph
.
whenReady
{
gradle
.
taskGraph
.
whenReady
{
gitProperties
.
dotGitDirectory
=
project
.
rootProject
.
layout
.
projectDirectory
.
dir
(
'.git'
)
tasks
.
each
{
task
->
tasks
.
each
{
task
->
if
(
task
.
name
.
contains
(
"test"
))
{
if
(
task
.
name
.
contains
(
"test"
))
{
task
.
enabled
=
false
task
.
enabled
=
false
...
...
modules/auth/src/main/java/com/yiring/auth/config/SaTokenConfigure.java
浏览文件 @
f3d72ae9
...
@@ -4,8 +4,11 @@ package com.yiring.auth.config;
...
@@ -4,8 +4,11 @@ package com.yiring.auth.config;
import
cn.dev33.satoken.interceptor.SaInterceptor
;
import
cn.dev33.satoken.interceptor.SaInterceptor
;
import
cn.dev33.satoken.router.SaHttpMethod
;
import
cn.dev33.satoken.router.SaHttpMethod
;
import
cn.dev33.satoken.router.SaRouter
;
import
cn.dev33.satoken.router.SaRouter
;
import
cn.dev33.satoken.spring.pathmatch.SaPatternsRequestConditionHolder
;
import
cn.dev33.satoken.stp.StpUtil
;
import
cn.dev33.satoken.stp.StpUtil
;
import
cn.dev33.satoken.strategy.SaStrategy
;
import
com.yiring.auth.util.Auths
;
import
com.yiring.auth.util.Auths
;
import
jakarta.annotation.PostConstruct
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.web.servlet.config.annotation.InterceptorRegistry
;
import
org.springframework.web.servlet.config.annotation.InterceptorRegistry
;
import
org.springframework.web.servlet.config.annotation.WebMvcConfigurer
;
import
org.springframework.web.servlet.config.annotation.WebMvcConfigurer
;
...
@@ -21,6 +24,14 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
...
@@ -21,6 +24,14 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
@Configuration
public
class
SaTokenConfigure
implements
WebMvcConfigurer
{
public
class
SaTokenConfigure
implements
WebMvcConfigurer
{
/**
* 重写路由匹配算法,切换为 ant_path_matcher 模式,使之可以支持 `**` 之后再出现内容
*/
@PostConstruct
public
void
customRouteMatcher
()
{
SaStrategy
.
instance
.
routeMatcher
=
SaPatternsRequestConditionHolder:
:
match
;
}
@Override
@Override
public
void
addInterceptors
(
InterceptorRegistry
registry
)
{
public
void
addInterceptors
(
InterceptorRegistry
registry
)
{
// 注册 Sa-Token 路由拦截器
// 注册 Sa-Token 路由拦截器
...
...
modules/auth/src/main/java/com/yiring/auth/config/SaTokenContextByPatternsRequestCondition.java
deleted
100644 → 0
浏览文件 @
b06b5afb
/* (C) 2023 YiRing, Inc. */
package
com
.
yiring
.
auth
.
config
;
import
cn.dev33.satoken.spring.SaTokenContextForSpringInJakartaServlet
;
import
cn.dev33.satoken.spring.pathmatch.SaPatternsRequestConditionHolder
;
import
org.springframework.context.annotation.Primary
;
import
org.springframework.stereotype.Component
;
/**
* 自定义 SaTokenContext 实现类,重写 matchPath 方法,切换为 ant_path_matcher 模式,使之可以支持 `**` 之后再出现内容
* @author Jim
* @version 0.1
* 2023/12/19 11:57
*/
@Primary
@Component
public
class
SaTokenContextByPatternsRequestCondition
extends
SaTokenContextForSpringInJakartaServlet
{
@Override
public
boolean
matchPath
(
String
pattern
,
String
path
)
{
return
SaPatternsRequestConditionHolder
.
match
(
pattern
,
path
);
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论