Spring 配置中的 ${}
来源:互联网 发布:java 单例 并发多线程 编辑:程序博客网 时间:2024/05/17 04:59
<!-- ============ GENERAL DEFINITIONS========== -->
<!-- Configurer that replaces ${...} placeholders with values from a properties file -->
<!-- (in this case, JDBC-related settings for the dataSource definition below) -->
<bean id="propertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location">
<value>classpath:spring/jdbc-oracle.properties</value>
</property>
</bean>
<!-- =========== RESOURCE DEFINITIONS ============ -->
<!-- Local DataSource that works in any environment -->
<bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName">
<value>${jdbc.driverClassName}</value>
</property>
<property name="url">
<value>${jdbc.url}</value>
</property>
<property name="username">
<value>${jdbc.username}</value>
</property>
<property name="password">
<value>${jdbc.password}</value>
</property>
</bean>
当jdbc-oracle.properties文件加载下后,${}即可取出其中的内容
- Spring 中的 Bean 配置
- Spring中的Quartz配置
- Spring中的Quartz配置
- Spring中的Quartz配置
- Spring中的@Transactional配置
- spring中的quartz配置
- Spring中的@Transactional配置
- Spring中的@Transactional配置
- Spring中的Quartz配置
- 关于Spring中的配置
- Spring中的AOP配置
- Spring 中的 Bean 配置
- Spring中的Quartz配置
- Spring中的Bean配置
- Spring中的Bean配置
- Spring 配置中的 ${}
- spring中的配置
- Spring中的配置类
- BGSLibrary: A Background Subtraction Library
- JSP数据和JavaScirpt数据交互使用问题
- activity和view进场和退场动画
- vim命令
- SQL语句导入导出大全
- Spring 配置中的 ${}
- CentOs下安装gcc/g++/gdb
- Spring 配置之 PropertyPlaceholderConfigurer
- HTTP Status 500
- JS(去掉前后空格或去掉所有空格)的用法
- ORACLE
- 计算机网络小知识点
- 共享元素的实现
- Spark踩坑记——初试