<?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:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.2.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.2.xsd"> <!-- 在spring中加载配置文件 -->
<context:property-placeholder location="classpath:conf/resource.properties"/> <context:component-scan base-package="cn.e3mall.controller" /> <!--利用注解驱动 配置springmvc的两大组件 -->
<mvc:annotation-driven /> <!-- 视图解析器 -->
<bean
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/jsp/" />
<property name="suffix" value=".jsp" />
</bean> <!-- 对静态资源进行放行 -->
<mvc:resources location="/css/" mapping="/css/**"></mvc:resources>
<mvc:resources location="/js/" mapping="/js/**"></mvc:resources> <!-- 定义文件上传解析器 -->
<bean id="multipartResolver"
class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<!-- 设定默认编码 -->
<property name="defaultEncoding" value="UTF-8"></property>
<!-- 设定文件上传的最大值5MB,5*1024*1024 -->
<property name="maxUploadSize" value="5242880"></property>
</bean> <!-- 引用dubbo服务 -->
<dubbo:application name="e3-manager-web"/>
<dubbo:registry protocol="zookeeper" address=" 192.168.25.129:2181"/>
<!-- itemService是 itemServiceImpl的一个代理对象-->
<dubbo:reference interface="cn.e3mall.service.ItemService" id="itemService" />
<dubbo:reference interface="cn.e3mall.service.ItemCatService" id="itemCatService" /> </beans>

springmvc.xml配置的更多相关文章

  1. SpringMVC、SpringMVC XML配置(纯XML方式)

    1.引入SrpingMVC所使用的Java包: cglib-nodep-2.1_3.jar.commons-logging.jar.spring-aspects-4.1.7.RELEASE.jar.s ...

  2. springmvc访问静态资源的springmvc.xml配置

    一. 问题及需求 由于Spring MVC的web.xml文件中关于DispatcherServlet拦截url的配置为"/",拦截了所有的请求,同时*.js,*.jpg等静态资源 ...

  3. SpringMvc xml 配置

    <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5" ...

  4. spring-mvc.xml配置

    1.自动扫描 <!-- 自动扫描该包,使SpringMVC认为包下用了@controller注解的类是控制器 --> <context:component-scan base-pac ...

  5. SpringMvc多视图配置(jsp、velocity、freemarker) velocity在springmvc.xml配置VelocityViewResolver,VelocityConfigurer,FreeMarkerConfigurer,FreeMarkerViewResolver

    ?xml version="1.0"encoding="UTF-8"?> <beans xmlns="http://www.springf ...

  6. JAVAWEB 一一SpringMVC(XML配置)

    web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app version="2 ...

  7. springmvc.xml配置图解

  8. springmvc.xml和applicationContext.xml配置的特点

    1:springmvc.xml配置要点 一般它主要配置Controller的组件扫描器和视图解析器 下为:springmvc.xml文件 <?xml version="1.0" ...

  9. springmvc学习指南 之---第27篇 spring如何实现servlet3.0无web.xml 配置servlet对象的

    writedby 张艳涛 基于web.xml配置,有人说麻烦,tomcat给按照servlet3.0,实现了基于注解@WebServlet,有人说springmvc的springmvc.xml配置麻烦 ...

随机推荐

  1. 建立spring项目入门实例

    建立maven项目 打开pop.xml文件 添加springframework所依赖的包 <!-- https://mvnrepository.com/artifact/org.springfr ...

  2. java判断一个数是否为素数[转]

    http://blog.csdn.net/lwcumt/article/details/8027586 import java.util.Scanner; //质数又称素数,是指在一个大于1的自然数中 ...

  3. Zedboard学习(二):zedboard的Linux下交叉编译环境搭建 标签: 交叉编译linuxzedboard 2017-07-04 23:49 19人阅读

    环境准备 首先肯定是要下载xilinx-2011.09-50-arm-xilinx-linux-gnueabi.bin文件,这是官方提供的linux下交叉编译链安装文件,下载地址为:https://p ...

  4. kalilinux-漏洞评估

    Nessus\OpenVAS http://www.tenable.com/products/nessus/select-your-operating-system http://www.nessus ...

  5. Joomla3x-CKEditor4x-WordPaster整合示例

    1.1. 集成到Joomla_3.4.7-ckeditor4x 资源下载:Joomla 3x,   1.1.1. 添加wordpaster文件夹 路径:/media/wordpaster/   1.1 ...

  6. JS 观察者模式

    Events = function() { var listen, log, obj, one, remove, trigger, __this; obj = {}; __this = this; l ...

  7. 设计模式3---工厂模式(Factory Pattern简单工厂、工厂方法、抽象工厂)

    工厂模式:主要用来实例化有共同接口的类,工厂模式可以动态决定应该实例化那一个类.工厂模式的形态工厂模式主要用一下几种形态:1:简单工厂(Simple Factory).2:工厂方法(Factory M ...

  8. Linux下安装python,ftp,Ubuntu和centos配置静态ip以及下载地址

    一个服务器最多创建65535个端口Ubuntu apt-get aliyun转换https://www.cnblogs.com/hcl1991/p/7894958.htmlOpenSSLhttps:/ ...

  9. android开发内存优化之软引用

    所有Android的开发者一定都遇到过内存溢出这个头疼的问题,一旦出现这个问题,很难直接确定我们的应用是那里出了问题,要想定位问题的原因,必须通过一些内存分析工具和强大的经验积累才能快速的定位到问题具 ...

  10. 求帮忙解决封装jquery图片滚动问题

    今天用jquery封装了点击图片滚动,但是发现在屏幕自适应时,图片停在的位置会随着屏幕大小而错位(我引入了pocketgrid.css响应式文件,但没办法去那边修改onsize事件...),求大神.. ...