Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Y
yudao-cloud
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
hblj
yudao-cloud
Commits
b4e68fa0
提交
b4e68fa0
authored
11月 11, 2022
作者:
YunaiV
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
简化 Gateway Swagger 的配置,去除无用的
上级
9399f362
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
10 行增加
和
21 行删除
+10
-21
YudaoWebSecurityConfigurerAdapter.java
...rk/security/config/YudaoWebSecurityConfigurerAdapter.java
+0
-1
pom.xml
yudao-gateway/pom.xml
+9
-13
application.yaml
yudao-gateway/src/main/resources/application.yaml
+1
-7
没有找到文件。
yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/config/YudaoWebSecurityConfigurerAdapter.java
浏览文件 @
b4e68fa0
...
...
@@ -127,7 +127,6 @@ public class YudaoWebSecurityConfigurerAdapter extends WebSecurityConfigurerAdap
.
antMatchers
(
HttpMethod
.
DELETE
,
permitAllUrls
.
get
(
HttpMethod
.
DELETE
).
toArray
(
new
String
[
0
])).
permitAll
()
// 基于 yudao.security.permit-all-urls 无需认证
.
antMatchers
(
securityProperties
.
getPermitAllUrls
().
toArray
(
new
String
[
0
])).
permitAll
()
.
antMatchers
(
"/captcha/get"
,
"/captcha/check"
).
permitAll
()
// 设置 App API 无需认证
.
antMatchers
(
buildAppApi
(
"/**"
)).
permitAll
()
// ②:每个项目的自定义规则
...
...
yudao-gateway/pom.xml
浏览文件 @
b4e68fa0
...
...
@@ -44,6 +44,15 @@
<artifactId>
javax.servlet-api
</artifactId>
</dependency>
<dependency>
<groupId>
com.github.xiaoymin
</groupId>
<artifactId>
knife4j-spring-boot-starter
</artifactId>
</dependency>
<dependency>
<groupId>
io.swagger
</groupId>
<artifactId>
swagger-annotations
</artifactId>
</dependency>
<!-- RPC 远程调用相关 -->
<dependency>
<groupId>
org.springframework.cloud
</groupId>
...
...
@@ -68,19 +77,6 @@
<artifactId>
yudao-spring-boot-starter-monitor
</artifactId>
</dependency>
<dependency>
<groupId>
com.github.xiaoymin
</groupId>
<artifactId>
knife4j-spring-boot-starter
</artifactId>
</dependency>
<dependency>
<groupId>
io.swagger
</groupId>
<artifactId>
swagger-annotations
</artifactId>
</dependency>
<dependency>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-boot-starter
</artifactId>
<version>
3.0.0
</version>
</dependency>
</dependencies>
...
...
yudao-gateway/src/main/resources/application.yaml
浏览文件 @
b4e68fa0
...
...
@@ -5,12 +5,6 @@ spring:
cloud
:
# Spring Cloud Gateway 配置项,对应 GatewayProperties 类
gateway
:
discovery
:
locator
:
# gateway开启服务注册和发现的功能,
enabled
:
true
# 将请求路径上的服务名配置为小写(因为服务注册的时候,向注册中心注册时将服务名转成大写的了)
lowerCaseServiceId
:
true
# 路由配置项,对应 RouteDefinition 数组
routes
:
-
id
:
system-admin-api
# 路由的编号
...
...
@@ -30,7 +24,7 @@ spring:
predicates
:
# 断言,作为路由的匹配条件,对应 RouteDefinition 数组
-
Path=/admin-api/infra/**
filters
:
-
RewritePath=/admin-api/infra
m
/v2/api-docs, /v2/api-docs
-
RewritePath=/admin-api/infra/v2/api-docs, /v2/api-docs
-
id
:
infra-app-api
# 路由的编号
uri
:
grayLb://infra-server
predicates
:
# 断言,作为路由的匹配条件,对应 RouteDefinition 数组
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论