<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="https://www.springframework.org/schema/beans"
xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
xmlns:context="https://www.springframework.org/schema/context"
xmlns:util="https://www.springframework.org/schema/util"
xsi:schemaLocation="https://www.springframework.org/schema/beans
https://www.springframework.org/schema/beans/spring-beans-3.0.xsd
https://www.springframework.org/schema/context
https://www.springframework.org/schema/context/spring-context-3.0.xsd
https://www.springframework.org/schema/util
https://www.springframework.org/schema/util/spring-util-3.0.xsd">
<context:annotation-config/>
<!-- picks up and registers AppConfig as a bean definition -->
<context:component-scan base-package="com.web.spring.other" />
<bean class="com.web.spring.other.AppConfig"/>
办法一
<context:property-placeholder location="classpath:jdbc.properties" />
办法二
<util:properties id="jdbcProperties" location="classpath:jdbc.properties"/>
</beans><?xml version="1.0" encoding="UTF-8"?>
<beans