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>     
            
            
    ----------->农民工的码农转型之路
  • 相关阅读:
    windows 安装mysql 步骤
    x-editable 的使用方法
    asp.net连接数据库
    fedora下根据字符查找软件包
    ubuntu 常用命令
    第8课-库函数方式文件编程
    第7课-系统调用方式文件编程
    第6课-函数库设计
    第5课-Linux编程规范
    第4课-Linux应用程序地址布局
  • 原文地址:https://www.cnblogs.com/shitulaoma/p/12393232.html
Copyright © 2011-2022 走看看