<?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}等占位符的情况。

相关文章:

  • 2021-08-15
  • 2021-10-20
  • 2022-12-23
  • 2021-10-20
  • 2022-12-23
  • 2021-10-21
  • 2022-12-23
  • 2021-04-12
猜你喜欢
  • 2022-01-06
  • 2022-12-23
  • 2022-01-14
  • 2022-12-23
  • 2022-12-23
  • 2021-07-01
  • 2022-02-21
相关资源
相似解决方案