<context:annotation-config/>
<!-- 注册接口对应的service包 -->
<context:component-scan
base-package="com.xxx.xxx">
</context:component-scan>
<!-- 加载属性文件,加载数据库连接 -->
<context:property-placeholder location="classpath:config.properties"/>
<bean id="config" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="location" value="classpath:config.properties"></property>
</bean>
<bean id="SpringUtil" class="com.xxx.util.SpringUtil" scope="singleton" ></bean>
<bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
<property name="host" value="${mail.smtp.host}"></property>
<property name="username" value="${mail.smtp.username}"></property>
<property name="password" value="${mail.smtp.password}"></property>
<property name="defaultEncoding" value="utf-8"></property>
</bean>
<!-- 引入配置文件 -->
<import resource="dao.xml"/>
<import resource="task.xml"/>