XXX-data.xml:
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
${jdbc.driverClassName}
${jdbc.url}
${jdbc.username}
${jdbc.password}
applicationContext.xml:
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
classpath:jdbc.properties
jdbc.properties:
jdbc.driverClassName=oracle.jdbc.driver.OracleDriver
jdbc.url=jdbc:oracle:thin:@192.168.0.18:1521:dbname
jdbc.username=username
jdbc.password=password
阅读(889) | 评论(0) | 转发(0) |