由於web.xml 的配置的原因,會默認攔截所有請求到springmvc的框架中去,所以導致js jpg html等的請求都無效了
springmvc3.0以上的版本多了個靜態目錄,只要配置靜態目錄就可以過濾掉該目錄下的請求
<mvc:resources location="/html/" mapping="/html/**"/> <mvc:resources location="/back_css/" mapping="/back_css/**"/> <mvc:resources location="/back_js/" mapping="/back_js/**"/> <mvc:resources location="/back_img/" mapping="/back_img/**"/> <mvc:resources location="/back_other/" mapping="/back_other/**"/> <mvc:resources location="/layer/" mapping="/layer/**"/> <mvc:resources location="/laypage/" mapping="/laypage/**"/>