Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
ShopERP
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杜龙飞
ShopERP
Commits
01017ea9
Commit
01017ea9
authored
Jul 28, 2025
by
PC-20220610JUCQ\Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
<develop>:(ShopERP 端)<无> ApiGateWay 优化。
parent
8c8c1fa4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
ShopERP.Ocelot.ApiGateWay/Program.cs
+3
-3
ShopERP.Ocelot.ApiGateWay/appsettings.json
+1
-1
No files found.
ShopERP.Ocelot.ApiGateWay/Program.cs
View file @
01017ea9
...
...
@@ -14,15 +14,15 @@ namespace ShopERP.Ocelot.ApiGateWay
// Add services to the container.
builder
.
Services
.
AddControllersWithViews
();
//将 服务发现,注册到容器中
builder
.
Services
.
AddTransient
<
ConsulServiceDiscover
>();
////添加 Ocelot 并添加配置文件
builder
.
Configuration
.
AddJsonFile
(
"ocelot.json"
,
optional
:
true
,
reloadOnChange
:
true
);
//使用 Ocelot 接管代码
builder
.
Services
.
AddOcelot
(
builder
.
Configuration
);
//将 服务发现,注册到容器中
builder
.
Services
.
AddTransient
<
ConsulServiceDiscover
>();
var
app
=
builder
.
Build
();
// Configure the HTTP request pipeline.
...
...
ShopERP.Ocelot.ApiGateWay/appsettings.json
View file @
01017ea9
...
...
@@ -8,7 +8,7 @@
"AllowedHosts"
:
"*"
,
"Consul"
:
{
"consulAddress"
:
"http://127.0.0.1:8500"
,
"serviceName"
:
"
platform
"
,
"serviceName"
:
"
api
"
,
"apiServiceName"
:
"api"
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment