maven exec plugin启动springboot应用并且change port更改端口(多模块)
<!--在子模块的pom中添加-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<!-- automatically creates the classpath using all project dependencies,
also adding the project build directory -->
<classpath/>
<argument>-Dserver.port=8081</argument>
<argument>com.rf.wxshop.WxshopApplication</argument>
</arguments>
</configuration>
</plugin>