在使用spring boot進(jìn)行打包的時候出現(xiàn)了一些問題,不是說找不到主類,就是說spring初始化時有些類沒有加載。
下面介紹一下如何解決。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
< build > < plugins > < plugin > < groupId >org.apache.maven.plugins</ groupId > < artifactId >maven-compiler-plugin</ artifactId > < configuration > < source >1.8</ source > < target >1.8</ target > < encoding >utf-8</ encoding > </ configuration > </ plugin > < plugin > < groupId >org.springframework.boot</ groupId > < artifactId >spring-boot-maven-plugin</ artifactId > < configuration > < mainClass >com.xueyou.zkview.service.App</ mainClass > </ configuration > < executions > < execution > < goals > < goal >repackage</ goal > </ goals > </ execution > </ executions > </ plugin > </ plugins > </ build > |
這樣就能夠打出jar包了。
以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持服務(wù)器之家。
原文鏈接:http://blog.csdn.net/wild46cat/article/details/78046138