官方链接:https://docs.spring.io/spring-boot/docs/2.1.6.RELEASE/reference/html/boot-features-developing-web-applications.html#boot-features-customizing-embedded-containers 第一种方法: 第二种方法: