1:首先本地调试好。
2:pom.xml下修改:
补充:
<packaging>war</packaging>
补充启动类及引用
<properties>
<project.build.sourceEncoding>GB2312</project.build.sourceEncoding>
<start-class>shedul.SpringBeanApplication</start-class>
</properties>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<arguments>
<argument>--spring.profiles.active=prd2</argument>
</arguments>
<jvmArguments>
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005
</jvmArguments>
<mainClass>${start-class}</mainClass>
</configuration>
</plugin>
结果附图: