在META-INF/spring.factories文件中,你可以激活创建PID文件的listener(s),示例:
META-INF/spring.factories
listener(s)
org.springframework.context.ApplicationListener=\org.springframework.boot.system.ApplicationPidFileWriter,\org.springframework.boot.system.EmbeddedServerPortFileWriter