idea
@override is not allowed when implement
打包
spring boot项目
当开发spring boot 使用原生的plugin即可:
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

即可运行
java -jar connector-0.0.1-SNAPSHOT.jar
普通maven项目:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

然后通过执行java -jar cps-1.0-SNAPSHOT-jar-with-dependencies.jar运行。
Last updated
Was this helpful?