springmvc resources 配置


http://www.mkyong.com/spring-mvc/spring-mvc-how-to-include-js-or-css-files-in-a-jsp-page/

如果
<mvc:resources mapping="/resources/**" location="/resources/mytheme/" />注意location是Webroot目录下面的文件夹

<link href="${pageContext.request.contextPath}/resources/css/main.css" rel="stylesheet" >
需要在映射目录前面加上工程名称

原文地址:https://www.cnblogs.com/huiwq1990/p/3916882.html