问题解决后的项目结构(不想往后看的直接对照自己的项目就好):

IDEA SpringMVC The origin server did not find a current representation for the target

关键是Resource Folders的配置。

之前一直用SpringBoot,突然需要改一个SpringMVC的项目,一顿操作之后,项目跑不起来,报如下错:

IDEA SpringMVC The origin server did not find a current representation for the target

 

搞了半天,仔细的我发现web.xml文件找不到配置文件,如下图:

IDEA SpringMVC The origin server did not find a current representation for the target

然后定位到是配置的问题。

就开始改配置,我用的是2019.2版的IDEA,File->Project Structure->Modules->你的项目->Resources:

IDEA SpringMVC The origin server did not find a current representation for the target

 

然后清理一下项目,再跑一下:

IDEA SpringMVC The origin server did not find a current representation for the target

然后就万事大吉了:

IDEA SpringMVC The origin server did not find a current representation for the target

 

总结:

仔细观察项目的报错信息,拥有独立的分析,外加坚定信仰,不忘初心^_^。

相关文章: