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
d4514c38
"vscode:/vscode.git/clone" did not exist on "14790d9ad8a72be2f0e3515232513c3bffc8ce63"
Commit
d4514c38
authored
Mar 07, 2022
by
Zheng Jie
Browse files
启动时记录pid
parent
c5723649
Changes
2
Hide whitespace changes
Inline
Side-by-side
eladmin-system/src/main/java/me/zhengjie/AppRun.java
View file @
d4514c38
...
@@ -20,6 +20,7 @@ import me.zhengjie.annotation.rest.AnonymousGetMapping;
...
@@ -20,6 +20,7 @@ import me.zhengjie.annotation.rest.AnonymousGetMapping;
import
me.zhengjie.utils.SpringContextHolder
;
import
me.zhengjie.utils.SpringContextHolder
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.context.ApplicationPidFileWriter
;
import
org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory
;
import
org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory
;
import
org.springframework.boot.web.servlet.server.ServletWebServerFactory
;
import
org.springframework.boot.web.servlet.server.ServletWebServerFactory
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
...
@@ -45,7 +46,9 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -45,7 +46,9 @@ import org.springframework.web.bind.annotation.RestController;
public
class
AppRun
{
public
class
AppRun
{
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
AppRun
.
class
,
args
);
SpringApplication
springApplication
=
new
SpringApplication
(
AppRun
.
class
);
springApplication
.
addListeners
(
new
ApplicationPidFileWriter
());
springApplication
.
run
(
args
);
}
}
@Bean
@Bean
...
...
eladmin-system/src/main/resources/config/application.yml
View file @
d4514c38
...
@@ -12,8 +12,6 @@ spring:
...
@@ -12,8 +12,6 @@ spring:
redis
:
redis
:
repositories
:
repositories
:
enabled
:
false
enabled
:
false
pid
:
file
:
/home/eladmin/app.pid
#配置 Jpa
#配置 Jpa
jpa
:
jpa
:
...
...
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