谷粒商城网关服务建立(七)

26、分布式组件-SpringCloud-Gateway网关核心概念&原理

27、分布式组件-SpringCloud-Gateway-创建&测试API网关

视频中这2节讲的比较浅,就是简单的介绍了一下,具体在后面用,之前也写过博客:https://www.cnblogs.com/dalianpai/p/12288456.html

 排除数据源自动配置

@EnableDiscoveryClient
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
public class GulimallGatewayApplication {

    public static void main(String[] args) {
        SpringApplication.run(GulimallGatewayApplication.class, args);
    }

}  

配置文件

spring:
  application:
    name: gulimall-gateway
  cloud:
    nacos:
      config:
        server-addr: 192.168.1.118:8848
        namespace: 9293a967-9ee0-412f-90f3-009de1e10426
        group: dev
        file-extension: yaml

猜你喜欢

转载自www.cnblogs.com/dalianpai/p/12968636.html
今日推荐