1.构建项目,通过以下命令
命令1:git clone https://github.com/eugenp/tutorials.git
描述:从github上把代码拉到本地
截图:
命令2:cd tutorials/jjwt
描述:进入到jjwt目录
截图:
编辑pom.xml文件,在project元素中添加以下代码
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
命令3:mvn clean install
描述:通过mvn进行生成jar包
截图:
2.启动应用,通过以下命令
命令1:cd target
描述:进入生成的jar包目录
截图:
命令2:java -jar jjwt-0.0.1-SNAPSHOT.jar
描述:打包,编辑,运行
截图: