笔记
Springboot 修改配置文件
Maven Lifecycle
使用 Maven exec plugin
pom.xml加入:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.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>com.example.Main</argument> //运行这个程序的时候用什么参数
</arguments>
</configuration>
</plugin>
运行:
# mvn exec:exec
参考于:MojoHaus
emmm....感觉不太方便。
jar包
jar包:编译后的代码和资源打包
# mvn package
mvn xxx -DskipTests 忽略测试
# java -jar xxx.jar/xxx.zip
本质其实还是 #java -classpath com.example.Main
Docker
emmm...好像差不多