Sin descripción

yangzhijie1488@163.com b39daa673d 修改跨域的配置,增加二级域名的配置。 hace 3 años
.vscode 7bbab06e17 修改网关服务器中工作流服务器的配置。 hace 6 años
bat 6508e93b12 优化启动名称。 hace 5 años
src b39daa673d 修改跨域的配置,增加二级域名的配置。 hace 3 años
.classpath eb89b9dde6 修复Token过长的BUG。 hace 5 años
.factorypath 7bbab06e17 修改网关服务器中工作流服务器的配置。 hace 6 años
.gitignore 65b888a472 修改忽略。 hace 6 años
README.md 02055a0c75 修改README。 hace 6 años
pom.xml 800ddb03ad spring cloud 的版本升级到了 2020.0.4版本,spring-boot-starter-parent升级到了2.4.6版本。 hace 4 años

README.md

GatewayServer网关服务器

开发环境

Git克隆源代码到本地

git clone http://www.leanwo.com:3000/ShangHaiLeanwo/GatewayServer.git

源代码导入到eclipse中。注意事项如下:

  1. 工作空间的编码格式设置成UTF-8。(Preferences-General-Workspace-Text file encoding-Other(UTF-8))
  2. 使用外部的maven(maven设置了国内镜像)
  3. 2.1 Window-Preferences-Maven-Installations-Add-Installation home: Directory(Select apache maven install folder)-Finish
  4. 2.2 Window-Preferences-Maven-User Settings-User Settings,(Browser)(Select apache maven install folder/config/settings.xml)-Update Settings

默认配置

  • 修改端口号,打开resources/Application.yml,修改属性server.port可以修改启动的端口号。

    server:
    port: 80
    
  • 修改Eureka服务器的地址,尽量不要修改该属性,该属性来源于服务管理器(ServerManagement)中的eureka.serviceUrl.defaultZone属性

    #Eureka Server服务器地址.
    eureka:
    client:
    fetch-registry: true
    register-with-eureka: true
    serviceUrl:
      defaultZone: http://localhost:88/eureka/
    
  • 修改zuul服务器的映射。

    zuul:
    #  隐藏所有微服务名称(即使用微服务名称无法访问到服务)
    ignored-services: "*"
    #  服务前缀名,想要访问项目之前要加上此路径
    # prefix: /file-server
    routes:
    #只要访问以/editor/开头的多层目录都可以路由到服务名为file-server的服务上.
    file-server:
      serviceId: file-server
      path: /**