监控服务运行状态

pull/789/head
Zheng Jie 2022-03-03 13:27:32 +08:00
parent fa0564c3f4
commit 78d5d406da
1 changed files with 12 additions and 0 deletions

View File

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