<?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:tx="http://www.springframework.org/schema/tx"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.0.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-4.0.xsd">
<!-- 自动注入注解所用的Processor -->
<!-- <context:annotation-config/> -->
<!-- 加载配置文件 -->
<context:property-placeholder location="classpath:db.properties" />
<!--数据源的配置 -->
<bean />
</bean>
</beans>
在spring的配置文件中配置数据源的前面不应该有其他的配置,暂时只知道不能配置<context:annotation-config/>,会出现解析不了${jdbc.url}等占位符的情况。