你需要激活META-INF/spring.factories文件里的listener(s):
META-INF/spring.factories
org.springframework.context.ApplicationListener=\ org.springframework.boot.actuate.system.ApplicationPidFileWriter, org.springframework.boot.actuate.system.EmbeddedServerPortFileWriter