参考:
https://blog.csdn.net/zhoucheng05_13/article/details/77915294
https://blog.csdn.net/mameng1988/article/details/79945760
先按照:
https://blog.csdn.net/zhoucheng05_13/article/details/77915294
文里的方法,修改 pom.xml 和 MainApplication
然后按照:
https://blog.csdn.net/mameng1988/article/details/79945760
文里的方法,Eclipse中右击项目名称,出现的界面框中点击“Run As”,然后选择“Maven install”等待编译成功,在项目空间的target目录下就可以看到打成的War包:项目名+版本号.war文件。
假设war文件名为 demo.war,spring boot 项目中匹配的路径为 hello
把demo.war 拷贝至 tomcat/webapps/ 目录
验证:
再到 tomcat/bin/ 目录下执行 startup.sh 脚本
打开浏览器访问 localhost:8080/demo/hello/