简体   繁体   English

Maven,春季启动-无法解析导入javax.validation

[英]Maven, Spring-boot - The import javax.validation can not be resolved

I have the same issue as in here (sorry am not yet able to comment) but the suggested dependency in the accepted answer did not help me (i have it already). 我有一个与这里相同的问题(对不起,现在还不能发表评论),但是建议的对接受答案的依赖性并没有帮助我(我已经知道了)。

What caused the problem for me : I had the project working fine on a computer then i decided to move to another computer which is more convenient for coding. 对我造成问题的原因:我的项目在计算机上可以正常运行,然后我决定移至另一台更便于编码的计算机上。 In the new computer, i installed the exact same environnement (Jdk1.8, Eclipse for JEE latest version) then i imported the project as existing maven project but i can not build it due to the mentionned error. 在新计算机中,我安装了完全相同的环境(Jdk1.8,Eclipse for JEE最新版本),然后将项目导入为现有的maven项目,但是由于提到的错误,我无法构建它。

What can i do to import it ? 我该怎么导入呢?

I tried many solutions like running maven clean, maven update, deleting old target folder...etc. 我尝试了许多解决方案,例如运行maven clean,maven更新,删除旧的目标文件夹等。

对于那些可能会想知道的人:清除Maven的缓存可以解决问题(在Windows当前用户目录中删除.m2 \\ repository),就像@Andy Wilkinson在评论中说的那样。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM