<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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/tx http://www.springframework.org/schema/tx/spring-tx.xsd"> <context:component-scan base-package="com.casic"> <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller"/> </context:component-scan> <!-- 默认通过application.properties读取配置 --> <bean id="applicationProperties" class="com.casic.PgInterface.core.spring.ApplicationPropertiesFactoryBean"/> <!-- 定义受环境影响易变的变量 --> <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="properties" ref="applicationProperties"/> </bean> <!-- 国际化 --> <bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource"> <property name="basenames" value="${application.i18n.packages}"/> </bean> <bean class="com.casic.PgInterface.core.logback.JulHandler"/> <bean id="applicationContextHelper" class="com.casic.PgInterface.core.spring.ApplicationContextHelper"/> <bean id="exportor" class="com.casic.PgInterface.core.ext.export.CsvExportor"/> <bean id="storeConnector" class="com.casic.PgInterface.core.ext.store.FileStoreConnector"> <property name="baseDir" value="${store.baseDir}"/> </bean> </beans>