Springboot打包成jar包与部署

首先在pom.xml文件中加上这段s 

<packaging>jar</packaging>

添加并保存后鼠标右键点击pom.xml->run as->maven install

打包完成后进入cmd 

cd 到项目中的target路径

java -jar 包名.jar运行即可访问localhost

111

发布了18 篇原创文章 · 获赞 0 · 访问量 2006

猜你喜欢

转载自blog.csdn.net/rye1009/article/details/85255215