zoukankan      html  css  js  c++  java
  • springMvc配置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"
    xmlns:p="http://www.springframework.org/schema/p"
    xmlns:jdbc="http://www.springframework.org/schema/jdbc"
    xmlns:jee="http://www.springframework.org/schema/jee"
    xmlns:tx="http://www.springframework.org/schema/tx"
    xmlns:jpa="http://www.springframework.org/schema/data/jpa"
    xmlns:util="http://www.springframework.org/schema/util"
    xsi:schemaLocation="
    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd
    http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd
    http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-4.3.xsd
    http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-4.3.xsd
    http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.3.xsd
    http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa-1.3.xsd
    http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.3.xsd">

    <!-- 启用spring mvc 注解 -->
    <context:annotation-config />
    <!-- 设置使用注解的类所在的jar包 -->
    <context:component-scan base-package="bean" />
    <context:component-scan base-package="config" />
    <context:component-scan base-package="controller" />
    <mvc:annotation-driven>
    <mvc:message-converters>
    <bean class="org.springframework.http.converter.StringHttpMessageConverter"/>
    <bean class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter"/>
    </mvc:message-converters>
    </mvc:annotation-driven>
    <!-- 静态资源 -->
    <mvc:resources mapping="/static/**" location="/static/" />
    <mvc:resources mapping="swagger-ui.html" location="classpath:/META-INF/resources/" />
    <mvc:resources mapping="/webjars/**" location="classpath:/META-INF/resources/webjars/" />
    </beans>

  • 相关阅读:
    SharePoint下载大文件失败 异常信息: system.OutOfMemoryException
    SharePoint Server 2010 容量管理:软件边界和限制
    PowerShell 备份sharepoint站点命令
    SharePoint 开发自定义WebService
    SPCAMLEditor 10分钟打造一个在线视频播放库
    使用PowerShell批量注册DLL到GAC
    设计模式之二 策略模式
    (转)Github上的热门iOS开源项目:AFNetworking、MagicalRecord、BlocksKit以及XVim
    (转)iOS开发常用的宏 大家一起来收集~
    (转)iOS开发资源:推送通知相关开源项目PushSharp、APNSPHP以及Pyapns等
  • 原文地址:https://www.cnblogs.com/hexiaofei/p/13472552.html
Copyright © 2011-2022 走看看