在spring的配置文件中加入
oracle10g.properties为src目录下的一个配置文件
在需要引入的地方直接写${properties文件中的key值}
例如:
可以让spring中的配置文件看起来简洁.
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<value>classpath:oracle10g.properties</value>
</property>
</bean>
oracle10g.properties为src目录下的一个配置文件
在需要引入的地方直接写${properties文件中的key值}
例如:
<property name="driverClass" value="${jdbc.driverClassName}" />
<property name="jdbcUrl" value="${jdbc.url}" />
<property name="user" value="${jdbc.username}"></property>
可以让spring中的配置文件看起来简洁.