1.
第一种编译器启动主函数不解释.
2.使用maven插件启动
2.1 进入项目目录
2.2 使用maven命令进行打包
mvn install -s "D:\apache-maven-3.5.4\conf\setting_human.xml"
跳过测试:
mvn install -s "D:\apache-maven-3.5.4\conf\setting_human.xml" -Dmaven.test.skip=true
跳过测试还可以配置在pom文件当中:
<properties>
<java.version>1.8</java.version>
<skipTests>true</skipTests>
</properties>
(-s 后制定的是setting文件.如果不指定将会使用默认的setting文件,可能会导致与编译器中maven仓库不相同,造成大量时间用户下载jar包.)
然后使用
mvn spring-boot:run -s "D:\apache-maven-3.5.4\conf\setting_human.xml"
进行启动
3. 使用java命令启动.
3.1 同样使用maven命令进行打包
mvn install -s "D:\apache-maven-3.5.4\conf\setting_human.xml"
打包成功会在target文件夹生产jar包.
3.2 进入target文件中执行java命令.
java -jar girl-0.0.1-SNAPSHOT.jar