mirror of https://github.com/elunez/eladmin
启动时记录pid
parent
c5723649e6
commit
d4514c384e
|
@ -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;
|
||||||
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
|
||||||
|
|
|
@ -12,8 +12,6 @@ spring:
|
||||||
redis:
|
redis:
|
||||||
repositories:
|
repositories:
|
||||||
enabled: false
|
enabled: false
|
||||||
pid:
|
|
||||||
file: /home/eladmin/app.pid
|
|
||||||
|
|
||||||
#配置 Jpa
|
#配置 Jpa
|
||||||
jpa:
|
jpa:
|
||||||
|
|
Loading…
Reference in New Issue