<?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:dubbo="http://code.alibabatech.com/schema/dubbo" xmlns:mvc="http://www.springframework.org/schema/mvc" 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"> <!-- 加载配置文件 --> <context:property-placeholder location="classpath:conf/resource.properties"/> <context:component-scan base-package="cn.e3mall.controller" /> <mvc:annotation-driven /> <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="prefix" value="/WEB-INF/jsp/" /> <property name="suffix" value=".jsp" /> </bean> <!-- 配置图片的解析器 --> <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"> <!-- 设置编码 --> <property name="defaultEncoding" value="UTF-8"></property> <!-- 设置文件上传的最大值 5M --> <property name="maxUploadSize" value="5242880"></property> </bean> <!-- 配置资源映射 --> <mvc:resources location="/css/" mapping="/css/**" /> <mvc:resources location="/js/" mapping="/js/**" /> <!-- 引用dubbo服务 --> <dubbo:application name="e3-manager-web"/> <dubbo:registry protocol="zookeeper" address="192.168.1.151:2181" timeout="600000"/> <dubbo:reference interface="cn.e3mall.service.ItemService" id="itemServices" timeout="600000"/> <dubbo:reference interface="cn.e3mall.service.ItemCatService" id="itemCatService" timeout="600000"/> <dubbo:reference interface="cn.e3mall.content.service.ContentCategoryService" id="contentCategoryService" timeout="600000"/> <dubbo:reference interface="cn.e3mall.content.service.ContentService" id="contentService" timeout="600000"/> <dubbo:reference interface="cn.e3mall.search.service.SearchItemService" id="searchItemService" timeout="600000"/> </beans>
springMVC配置Quartz的配置文件
<?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:task="http://www.springframework.org/schema/task" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.2.xsd http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.1.xsd"> <!-- 注解定时任务 --> <task:annotation-driven/>