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
f2161b28
Commit
f2161b28
authored
Sep 08, 2025
by
PC-20220610JUCQ\Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
<develop>:(ShopERP 端)<无> ShopERP 微服务健康检查接口优化。
parent
993d97ac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
2 deletions
+33
-2
CoreCms.Net.Web.WebApi/Controllers/HealthController.cs
+21
-2
CoreCms.Net.Web.WebApi/Doc.xml
+12
-0
No files found.
CoreCms.Net.Web.WebApi/Controllers/HealthController.cs
View file @
f2161b28
using
Microsoft.AspNetCore.Mvc
;
using
Microsoft.AspNetCore.Mvc
;
using
Microsoft.Extensions.Configuration
;
namespace
ShopERP.WebApi.Controllers
{
...
...
@@ -9,10 +11,27 @@ namespace ShopERP.WebApi.Controllers
[
ApiController
]
public
class
HealthController
:
Controller
{
private
IConfiguration
_configuration
;
/// <summary>
/// 构造函数注入
/// </summary>
/// <param name="configuration"></param>
public
HealthController
(
IConfiguration
configuration
)
{
_configuration
=
configuration
;
}
/// <summary>
/// 健康检查
/// </summary>
/// <returns></returns>
[
HttpGet
]
public
IActionResult
Index
()
{
return
Ok
(
"Health check..."
);
string
port
=
_configuration
[
"port"
]
??
""
;
var
objData
=
new
{
port
=
port
,
name
=
"HealthCheck"
};
return
Json
(
objData
);
}
}
}
CoreCms.Net.Web.WebApi/Doc.xml
View file @
f2161b28
...
...
@@ -9,6 +9,18 @@
健康检查
</summary>
</member>
<member
name=
"M:ShopERP.WebApi.Controllers.HealthController.#ctor(Microsoft.Extensions.Configuration.IConfiguration)"
>
<summary>
构造函数注入
</summary>
<param
name=
"configuration"
></param>
</member>
<member
name=
"M:ShopERP.WebApi.Controllers.HealthController.Index"
>
<summary>
健康检查
</summary>
<returns></returns>
</member>
<member
name=
"T:CoreCms.Net.Web.WebApi.Controllers.OrderController"
>
<summary>
订单调用接口数据
...
...
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