问题概述
分布式项目写完后,发现打包以及部署遇到了很多坑,百度的解决方案也没有一个特别完善的,特在此整理出解决的方案
主要问题:在ide上运行成功的springboot分布式项目,打包后部署至tomcat中,无法正常访问
可能报错类型
-
No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format : or :[:]:. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]
这个错误看第一句就好了,需要在pom文件里的的build标签中添加<defaultGoal>compile</defaultGoal>
标签就OK了 -
打包并部署到tomcat成功,但是使用l