springcloud-gateway自带web依赖,如果引用spring-boot-starter-web会报如下错误:

springcloud-gateway与spring-boot-starter-web不兼容

 

 

 

gateway yml配置:

 

spring:
  cloud:
    gateway:
      discovery:
        locator:
          enabled: true
          lower-case-service-id: true #服务名称支持小写
      routes:
          - id: hbistc-ums
            uri: lb://hbistc-ums
            predicates:
                  - Path=/ums/**
            filters:
                  - StripPrefix=1
      globalcors:
        cors-configurations:
          '[/**]':
            allowCredentials: true #允许访问携带token
            allowedOrigins: "*"
            allowedHeaders: "*"
            allowedMethods: "*"

 

相关文章:

  • 2022-12-23
  • 2019-09-05
  • 2021-11-09
  • 2021-07-27
  • 2021-10-21
  • 2021-07-05
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-01-03
  • 2022-12-23
  • 2021-08-26
  • 2021-06-20
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案