Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Eladmin
Commits
78d5d406
Commit
78d5d406
authored
Mar 03, 2022
by
Zheng Jie
Browse files
监控服务运行状态
parent
fa0564c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
eladmin-system/src/main/java/me/zhengjie/AppRun.java
View file @
78d5d406
...
...
@@ -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
);
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment