zoukankan      html  css  js  c++  java
  • spring-web.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:context="http://www.springframework.org/schema/context"
        xmlns:mvc="http://www.springframework.org/schema/mvc"
        xsi:schemaLocation="http://www.springframework.org/schema/beans  
         http://www.springframework.org/schema/beans/spring-beans.xsd
         http://www.springframework.org/schema/context 
         http://www.springframework.org/schema/context/spring-context.xsd
         http://www.springframework.org/schema/mvc
         http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd">
        <!-- 配置springMVC -->
        <!--1.开启springMVC注解模式 -->
        <mvc:annotation-driven />
        <!--2.静态资源默认servlet配置 (1)加入对静态资源的处理:js,gif,png (2)允许使用"/"做整体映射 -->
        <mvc:resources location="/resources/"
            mapping="/resources/**" />
        <mvc:default-servlet-handler />
        <!--3.定义视图解析器 -->
        <bean id="viewResolver"
            class="org.springframework.web.servlet.view.InternalResourceViewResolver">
            <property name="prefix" value="/WEB-INF/html/"></property>
            <property name="suffix" value=".html"></property>
        </bean>
        <!--4.扫描web相关的bean -->
        <context:component-scan
            base-package="com.imooc.o2o" />
    </beans>     
            
            
    ----------->农民工的码农转型之路
  • 相关阅读:
    Guzz入门教程
    设计模式开题
    纪录idea不能创建class类问题(Cannot Create Class)
    dbrouter实现流程图
    记录一次concurrent mode failure问题排查过程以及解决思路
    程序员的自我修养
    CyclicBarrier之共享锁的理解
    sed选项详解(options)
    sed 范围查找
    Sed命令
  • 原文地址:https://www.cnblogs.com/shitulaoma/p/12393232.html
Copyright © 2011-2022 走看看