mirror of
https://gitee.com/dromara/RuoYi-Cloud-Plus.git
synced 2025-09-26 13:48:20 +00:00
update 优化 gateway 对接 sentinel 使用网关特定模式
This commit is contained in:
@@ -88,6 +88,8 @@ spring:
|
||||
|
||||
# sentinel 配置
|
||||
sentinel:
|
||||
filter:
|
||||
enabled: false
|
||||
# nacos配置持久化
|
||||
datasource:
|
||||
ds1:
|
||||
|
@@ -13,6 +13,8 @@ import org.springframework.boot.context.metrics.buffering.BufferingApplicationSt
|
||||
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
|
||||
public class RuoYiGatewayApplication {
|
||||
public static void main(String[] args) {
|
||||
// 标记 sentinel 类型为 网关
|
||||
System.setProperty("csp.sentinel.app.type", "1");
|
||||
SpringApplication application = new SpringApplication(RuoYiGatewayApplication.class);
|
||||
application.setApplicationStartup(new BufferingApplicationStartup(2048));
|
||||
application.run(args);
|
||||
|
Reference in New Issue
Block a user