From fb5cc69a60d0f56287e03d62f924f8048c174c47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=E5=98=89=E9=98=B3?= Date: Sun, 18 Aug 2019 19:16:06 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85=E5=81=A5=E5=BA=B7=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.MD | 47 ++++++++++++++++++++++++++++-- src/main/resources/application.yml | 6 +++- 2 files changed, 50 insertions(+), 3 deletions(-) diff --git a/README.MD b/README.MD index 5b7c425..4c10250 100644 --- a/README.MD +++ b/README.MD @@ -13,9 +13,52 @@ 默认暴露端口:8080 -健康检查路径: +健康检查路径:`/actuator/beans`、`/actuator/info` -样例接口访问API +**请求样例** + +``` + GET http://localhost:8080/actuator/info +``` + +返回结果 + +```json +{ + "app": { + "author": "F嘉阳", + "encoding": "UTF-8" + } +} +``` +## 样例接口 + +**请求URL:** + +``` +GET/POST/PUT/DELETE http://localhost:8080/print/{content} +``` + +**参数:** + +| 参数名 | 类型 | 必选 | 内容 | 说明 | +| :------ | ---- | :--- | :--- | -------- | +| content | 字符 | 否 | info | 输出内容 | + +**请求样例** + +``` +http://localhost:8080/print/info +``` + + + +**返回示例** + +```json +hello , info +``` + diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index fa8ebb5..ccffb26 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -7,4 +7,8 @@ management: include: "*" endpoint: health: - show-details: always \ No newline at end of file + show-details: always +info: + app: + author: F嘉阳 + encoding: @project.build.sourceEncoding@ \ No newline at end of file