瀏覽代碼

添加健康检查

tags/v1.0.0^2
chengwang 1 年之前
父節點
當前提交
f49b2b8e12
共有 1 個檔案被更改,包括 21 行新增0 行删除
  1. +21
    -0
      tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/controller/HealthController.java

+ 21
- 0
tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/controller/HealthController.java 查看文件

@@ -0,0 +1,21 @@
package com.tuoheng.miniprogram.controller;

import com.tuoheng.common.core.utils.DateUtils;
import com.tuoheng.common.core.utils.JsonResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

@RestController
@RequestMapping("/health")
public class HealthController {

@GetMapping
public JsonResult getHealth() {
Date date = DateUtils.now();
return JsonResult.success(date);
}

}

Loading…
取消
儲存