Explorar el Código

添加健康检查

tags/v1.0.0^2
chengwang hace 1 año
padre
commit
f49b2b8e12
Se han modificado 1 ficheros con 21 adiciones y 0 borrados
  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 Ver fichero

@@ -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);
}

}

Cargando…
Cancelar
Guardar