1. Create a xxx.properties configuration file, save the database connection parameters related to
Driver = oracle.jdbc.OracleDriver
url = jdbc: the Oracle: Thin: @localhost: 1521: xe
the User = HR
password HR =
2. configuration file factory in Spring introducing small external profile
<context: property-placeholder location = "classpath: xxx.properties">
Note: location for the profile path
3. take the contents of the small profile
bean class creates connections found
<bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource">
<property name="driverClassName" value="${driver}"></property>
<property name="url" value="${url}"></property>
<property name="username" value="${user}"></property>
<property name="password" value="${password}"></property>
</bean>