相关疑难解决方法(0)

在春天找不到CSS,图像和JS静态文件

我的servlet-context.xml文件

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc"
    xmlns:context="http://www.springframework.org/schema/context"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
        http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">

    <!-- DispatcherServlet Context: defines this servlet's request-processing 
        infrastructure -->

    <context:component-scan base-package="com.aitrich.learnware.web" />

    <!-- Enables the Spring MVC @Controller programming model -->
    <mvc:annotation-driven />


    <!-- Maps '/' requests to the 'home' view -->
    <mvc:view-controller path="/" view-name="home" />


    <!-- Handles HTTP GET requests for /resources/** by efficiently serving 
        up static resources in the ${webappRoot}/resources directory -->

    <mvc:resources mapping="/resources/css/**" location="/resources/css/" />
    <mvc:resources mapping="/resources/js/libs/**" location="/resources/js/libs/" />
    <mvc:resources mapping="/resources/img/**" location="/resources/img/" …
Run Code Online (Sandbox Code Playgroud)

resources spring spring-mvc

2
推荐指数
1
解决办法
8597
查看次数

标签 统计

resources ×1

spring ×1

spring-mvc ×1