spring.xml 2.27 KB
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:context="http://www.springframework.org/schema/context"
	xsi:schemaLocation="http://www.springframework.org/schema/beans
	 					http://www.springframework.org/schema/beans/spring-beans-3.2.xsd 
						http://www.springframework.org/schema/context 
						http://www.springframework.org/schema/context/spring-context-3.2.xsd"
	default-autowire="byName">

	<context:component-scan base-package="com.diligrp.website" />

	<bean
		class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer">
		<property name="locations">
			<list>
				<value>classpath:config.properties</value>
				<value>classpath:db.properties</value>
				<value>classpath:manage.properties</value>
				<value>classpath:rocketMQ.properties</value>
				<value>classpath:image.properties</value>
			</list>
		</property>
		<property name="ignoreUnresolvablePlaceholders" value="true" />
	</bean>

	<!-- 自动注入ApplicationContext -->
	<bean class="com.diligrp.website.util.spring.ApplicationContextUtil" />
	<!-- jackson -->
	<bean
		class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
		<property name="messageConverters">
			<list>
				<bean
					class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter" />
				<bean
					class="org.springframework.http.converter.StringHttpMessageConverter">
					<property name="supportedMediaTypes">
						<list>
							<value>text/plain; charset=UTF-8</value>
						</list>
					</property>
				</bean>
			</list>
		</property>
	</bean>

	<!-- log gathering -->
	<bean id="logGatheringAdviser" class="com.diligrp.log.util.LogGatheringAdvisor">
		<!-- 此处log.system只带具体的业务系统,比如商品中心 -->
		<constructor-arg name="system" value="系统设置会员中心" />
	</bean>

	<import resource="classpath:spring-web.xml" />
	<import resource="classpath:spring-dao.xml" />
	<import resource="classpath:spring-redis.xml" />
	<import resource="classpath:spring-rpc.xml" />
	<import resource="classpath:spring-hbase.xml" />
	<import resource="classpath:spring-rocketmq.xml" />
</beans>