Spring 未映射 MVC 资源

Spring MVC resources not being mapped

my folder structure

enter image description here

而我在 JSP 页面中的代码是

<script src='${pageContext.request.contextPath}/AppNameController.js'/>

我仍然收到 404 错误

您将前缀设置为 /WEB-INF/jsp,但查看您的项目结构,您的 index.jsp 仅在 /WEB-INF 文件夹中,而不是在 /WEB-INF/jsp 文件夹中。

也改为:

${pageContext.request.contextPath}/resources/scripts/AppNameController.js