mirror of
https://github.com/jeecgboot/JeecgBoot.git
synced 2025-12-10 20:02:56 +00:00
优化gateway启动报警告
This commit is contained in:
parent
e7eed37470
commit
3ba5395d33
@ -25,11 +25,7 @@
|
||||
<!-- Gateway网关依赖,内置webflux-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-gateway</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.servlet</groupId>
|
||||
<artifactId>jakarta.servlet-api</artifactId>
|
||||
<artifactId>spring-cloud-starter-gateway-server-webflux</artifactId>
|
||||
</dependency>
|
||||
<!-- redis方式限流 -->
|
||||
<dependency>
|
||||
|
||||
@ -28,17 +28,21 @@ spring:
|
||||
username: @config.username@
|
||||
password: @config.password@
|
||||
gateway:
|
||||
discovery:
|
||||
locator:
|
||||
enabled: true
|
||||
globalcors:
|
||||
cors-configurations:
|
||||
'[/**]':
|
||||
allowCredentials: true
|
||||
#springboot2.4后需用allowedOriginPatterns
|
||||
allowedOriginPatterns: "*"
|
||||
allowedMethods: "*"
|
||||
allowedHeaders: "*"
|
||||
server:
|
||||
webflux:
|
||||
discovery:
|
||||
locator:
|
||||
enabled: true
|
||||
globalcors:
|
||||
cors-configurations:
|
||||
'[/**]':
|
||||
allow-credentials: true
|
||||
allowed-origin-patterns:
|
||||
- "*"
|
||||
allowed-methods:
|
||||
- "*"
|
||||
allowed-headers:
|
||||
- "*"
|
||||
#Sentinel配置
|
||||
sentinel:
|
||||
transport:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user