mirror of https://github.com/elunez/eladmin
监控服务运行状态
parent
fa0564c3f4
commit
78d5d406da
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue