server: port: 8500 spring: application: name: spzx-server-gateway cloud: nacos: discovery: server-addr: 192.168.2.82:8848 # server-addr: 192.168.31.202:8848 gateway: discovery: locator: enabled: true globalcors: cors-configurations: '[/**]': allowedOriginPatterns: "*" # 允许请求中携带的头信息 allowedHeaders: "*" # 运行跨域的请求方式 allowedMethods: "*" # 跨域检测的有效期,单位s maxAge: 36000 routes: - id: service-product uri: lb://service-product predicates: - Path=/*/product/** - id: service-user uri: lb://service-user predicates: - Path=/*/user/** - id: service-cart uri: lb://service-cart predicates: - Path=/api/order/cart/** datasource: type: com.zaxxer.hikari.HikariDataSource driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://60.204.230.80:3306/db_spzx?characterEncoding=utf-8&useSSL=false&allowPublicKeyRetrieval=true username: root password: "02120212" data: redis: host: 192.168.2.82 # host: 192.168.31.202 port: 6379 mybatis: config-location: classpath:mybatis-config.xml mapper-locations: classpath:/mapper/*/*.xml