Browse Source

添加健康检查

tags/v1.0.0^2
chengwang 1 year ago
parent
commit
f49b2b8e12
1 changed files with 21 additions and 0 deletions
  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 View File

@@ -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…
Cancel
Save