Commit 78d5d406 authored by Zheng Jie's avatar Zheng Jie
Browse files

监控服务运行状态

parent fa0564c3
......@@ -24,6 +24,8 @@ import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactor
import org.springframework.boot.web.servlet.server.ServletWebServerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.bind.annotation.RestController;
......@@ -67,4 +69,14 @@ public class AppRun {
public String index() {
return "Backend service started successfully";
}
/**
* 监控服务运行状态
*
* @return /generate_204
*/
@AnonymousGetMapping("/generate_204")
public ResponseEntity<Object> monitor() {
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment