tomcat mvn 常见问题总结
1.问题:pom文件中package war报错的时候
解决方法:
关闭eclipse 删除项目小面的.setting文件 重新启动,重新builder环境
2.mvn的私服配置
<activeProfiles>
<activeProfile>dev</activeProfile>
</activeProfiles>
<profiles>
<profile>
<id>dev</id>
<repositories>
<repository>
<id>nexus</id>
<url>http://localhost:8881/nexus/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
3.在eclipse中把Tomcat 8删掉不能重建问题,启动Tomcat重置本地配置问题(初始化tomcat)
把Eclipse里的tomcat删掉了,然后发现后面就不能重建了,今天也发现eclipse里的tomcat启动时会把本地原来conf目录下的配置比如:tomcat-users.xml,server.xml给重置
在eclipse中把之前的Tomcat 8删掉,重新配置一个,不料没有下一步。
解决的方法了,如下:
1.退出 eclipse
2.到[工程目录下]/.metadata/.plugins/org.eclipse.core.runtime下
3.把org.eclipse.wst.server.core.prefs和 org.eclipse.jst.server.tomcat.core.prefs这两个文件删掉
4.重启eclipse
4.Eclipse 项目无法部署到tomcat的问题解决方法
解决的方法了,如下:
1.右键单击项目,选择Properties:
2.选择Project Facets:
3.在右侧的Project Facet列表将 Dynamic Web Module勾选。勾选好了 后,点击右下角的Apply ,接着点击ok即可。
4.测试一下是否可以将项目添加到tomcat里面。单击tomcat,选择Add and Remove
5.看项目是否会显示在可添加的列表里面。
6.在左侧选择项目名称,可以添加到右侧列表里面。点击finish就可以看到
tomcat下面就有项目了。
5.spring-sharding文件连接类不好使
1.检查类的路径
2.检查spring配置文件是否有问题
3.检查项目pom文件中引入的包是否有问题
@RequestBody 请求内容是application/json的时候