From a027cc08e07379ec7a13e1b5e359a2f6cb7d0dab Mon Sep 17 00:00:00 2001 From: wanggang <76527413@qq.com> Date: Mon, 6 Jan 2020 11:45:14 +0800 Subject: [PATCH] update Former-commit-id: ec5a75435a70f2304d494f7ab1c10e2a3f27d4fd --- .../.gitignore | 0 .../ApiGatewayOcelot.csproj} | 0 .../Program.cs | 0 .../Properties/launchSettings.json | 0 .../Startup.cs | 0 .../appsettings.Development.json | 0 .../appsettings.json | 0 .../gateway.json | 37 ++++++++++++++++--- .../tempkey.rsa | 0 projects/IoTCenter/wwwroot/home.js | 4 +- .../src/main/resources/application.yml | 14 ++++++- projects/projects.sln | 4 +- 12 files changed, 48 insertions(+), 11 deletions(-) rename projects/{ApiGateway1 => ApiGatewayOcelot}/.gitignore (100%) rename projects/{ApiGateway1/ApiGateway.csproj => ApiGatewayOcelot/ApiGatewayOcelot.csproj} (100%) rename projects/{ApiGateway1 => ApiGatewayOcelot}/Program.cs (100%) rename projects/{ApiGateway1 => ApiGatewayOcelot}/Properties/launchSettings.json (100%) rename projects/{ApiGateway1 => ApiGatewayOcelot}/Startup.cs (100%) rename projects/{ApiGateway1 => ApiGatewayOcelot}/appsettings.Development.json (100%) rename projects/{ApiGateway1 => ApiGatewayOcelot}/appsettings.json (100%) rename projects/{ApiGateway1 => ApiGatewayOcelot}/gateway.json (60%) rename projects/{ApiGateway1 => ApiGatewayOcelot}/tempkey.rsa (100%) diff --git a/projects/ApiGateway1/.gitignore b/projects/ApiGatewayOcelot/.gitignore similarity index 100% rename from projects/ApiGateway1/.gitignore rename to projects/ApiGatewayOcelot/.gitignore diff --git a/projects/ApiGateway1/ApiGateway.csproj b/projects/ApiGatewayOcelot/ApiGatewayOcelot.csproj similarity index 100% rename from projects/ApiGateway1/ApiGateway.csproj rename to projects/ApiGatewayOcelot/ApiGatewayOcelot.csproj diff --git a/projects/ApiGateway1/Program.cs b/projects/ApiGatewayOcelot/Program.cs similarity index 100% rename from projects/ApiGateway1/Program.cs rename to projects/ApiGatewayOcelot/Program.cs diff --git a/projects/ApiGateway1/Properties/launchSettings.json b/projects/ApiGatewayOcelot/Properties/launchSettings.json similarity index 100% rename from projects/ApiGateway1/Properties/launchSettings.json rename to projects/ApiGatewayOcelot/Properties/launchSettings.json diff --git a/projects/ApiGateway1/Startup.cs b/projects/ApiGatewayOcelot/Startup.cs similarity index 100% rename from projects/ApiGateway1/Startup.cs rename to projects/ApiGatewayOcelot/Startup.cs diff --git a/projects/ApiGateway1/appsettings.Development.json b/projects/ApiGatewayOcelot/appsettings.Development.json similarity index 100% rename from projects/ApiGateway1/appsettings.Development.json rename to projects/ApiGatewayOcelot/appsettings.Development.json diff --git a/projects/ApiGateway1/appsettings.json b/projects/ApiGatewayOcelot/appsettings.json similarity index 100% rename from projects/ApiGateway1/appsettings.json rename to projects/ApiGatewayOcelot/appsettings.json diff --git a/projects/ApiGateway1/gateway.json b/projects/ApiGatewayOcelot/gateway.json similarity index 60% rename from projects/ApiGateway1/gateway.json rename to projects/ApiGatewayOcelot/gateway.json index b06aec1f..86c6ecc2 100644 --- a/projects/ApiGateway1/gateway.json +++ b/projects/ApiGatewayOcelot/gateway.json @@ -32,7 +32,7 @@ "Port": 8011 } ], - "UpstreamHttpMethod": [ "Get", "Post", "Head","Options","Put","Delete","Patch","Trace" ] + "UpstreamHttpMethod": [ "Get", "Post", "Head", "Options", "Put", "Delete", "Patch", "Trace" ] }, { "DownstreamPathTemplate": "/IoTCenter{everything}", @@ -44,7 +44,7 @@ "Port": 8011 } ], - "UpstreamHttpMethod": [ "Get", "Post", "Head","Options","Put","Delete","Patch","Trace" ] + "UpstreamHttpMethod": [ "Get", "Post", "Head", "Options", "Put", "Delete", "Patch", "Trace" ] }, { "DownstreamPathTemplate": "/StudyCenter", @@ -56,7 +56,7 @@ "Port": 8012 } ], - "UpstreamHttpMethod": [ "Get", "Post", "Head","Options","Put","Delete","Patch","Trace" ] + "UpstreamHttpMethod": [ "Get", "Post", "Head", "Options", "Put", "Delete", "Patch", "Trace" ] }, { "DownstreamPathTemplate": "/StudyCenter{everything}", @@ -68,8 +68,33 @@ "Port": 8012 } ], - "UpstreamHttpMethod": [ "Get", "Post", "Head","Options","Put","Delete","Patch","Trace" ] + "UpstreamHttpMethod": [ "Get", "Post", "Head", "Options", "Put", "Delete", "Patch", "Trace" ] }, + { + "DownstreamPathTemplate": "/ManagementCenter", + "UpstreamPathTemplate": "/ManagementCenter", + "DownstreamScheme": "http", + "DownstreamHostAndPorts": [ + { + "Host": "localhost", + "Port": 8013 + } + ], + "UpstreamHttpMethod": [ "Get", "Post", "Head", "Options", "Put", "Delete", "Patch", "Trace" ] + }, + { + "DownstreamPathTemplate": "/ManagementCenter{everything}", + "UpstreamPathTemplate": "/ManagementCenter{everything}", + "DownstreamScheme": "http", + "DownstreamHostAndPorts": [ + { + "Host": "localhost", + "Port": 8013 + } + ], + "UpstreamHttpMethod": [ "Get", "Post", "Head", "Options", "Put", "Delete", "Patch", "Trace" ] + }, + { "Priority": 0, "DownstreamPathTemplate": "/", @@ -78,10 +103,10 @@ "DownstreamHostAndPorts": [ { "Host": "localhost", - "Port": 8088 + "Port": 8020 } ], - "UpstreamHttpMethod": [ "Get", "Post", "Head","Options","Put","Delete","Patch","Trace" ] + "UpstreamHttpMethod": [ "Get", "Post", "Head", "Options", "Put", "Delete", "Patch", "Trace" ] } ], "GlobalConfiguration": { diff --git a/projects/ApiGateway1/tempkey.rsa b/projects/ApiGatewayOcelot/tempkey.rsa similarity index 100% rename from projects/ApiGateway1/tempkey.rsa rename to projects/ApiGatewayOcelot/tempkey.rsa diff --git a/projects/IoTCenter/wwwroot/home.js b/projects/IoTCenter/wwwroot/home.js index 18415a6c..a07ffcbc 100644 --- a/projects/IoTCenter/wwwroot/home.js +++ b/projects/IoTCenter/wwwroot/home.js @@ -1,6 +1,6 @@ -function IoTCenter_index() { +function IoTCenter_home() { return Vue.component('IoTCenter_index', function (resolve, reject) { - axios.get("/IoTCenter/index.html").then(function (response) { + axios.get("/IoTCenter/home.html").then(function (response) { resolve({ template: response.data, data() { diff --git a/projects/gateway/src/main/resources/application.yml b/projects/gateway/src/main/resources/application.yml index 17dc34ac..f402d14c 100644 --- a/projects/gateway/src/main/resources/application.yml +++ b/projects/gateway/src/main/resources/application.yml @@ -46,8 +46,20 @@ spring: - Header=Upgrade,websocket filters: - StripPrefix=1 + - id: StudyCenter + uri: http://localhost:8012/ + predicates: + - Path=/StudyCenter/** + filters: + - StripPrefix=0 + - id: ManagenmentCenter + uri: http://localhost:8013/ + predicates: + - Path=/ManagenmentCenter/** + filters: + - StripPrefix=0 - id: WebUI - uri: http://localhost:8088/ + uri: http://localhost:8020/ predicates: - Path=/** filters: diff --git a/projects/projects.sln b/projects/projects.sln index 6ab7b80b..535fe2dd 100644 --- a/projects/projects.sln +++ b/projects/projects.sln @@ -34,9 +34,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "IoT", "IoT", "{AE34E06D-C5C EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebUI", "WebUI\WebUI.csproj", "{B662B063-A311-4678-ADA4-83AD1A2F9C47}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApiGateway", "ApiGateway\ApiGateway.csproj", "{85B06C97-E253-4ECE-8FAB-8823414BA4C9}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ApiGateway", "ApiGateway\ApiGateway.csproj", "{85B06C97-E253-4ECE-8FAB-8823414BA4C9}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ManagementCenter", "ManagementCenter\ManagementCenter.csproj", "{5F0FAEDB-C0F6-44F1-AA06-424AB759AF15}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ManagementCenter", "ManagementCenter\ManagementCenter.csproj", "{5F0FAEDB-C0F6-44F1-AA06-424AB759AF15}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution