欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

No mapping found for HTTP request with URI [/xxx/xxx] in DispatcherServlet with name 'xxx'

程序员文章站 2022-07-15 13:25:29
...

No mapping found for HTTP request with URI [/xxx/xxx] in DispatcherServlet with name 'xxx'。

网上的方法都没用,最后发现src/main/resources下的资源没用打包进WEB-INF/classes

用maven构建的项目理论上会打包进去,既然不行就手动添加。

在pom.xml的<bulid>标签加入以下

<bulid>
    <resources>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
    </resources>
</bulid>