Guest User

Untitled

a guest
Nov 10th, 2017
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. jdbc.driverClassName=com.mysql.cj.jdbc.Driver
  2. jdbc.url=jdbc:mysql://localhost:3306/user
  3. jdbc.username="root"
  4. jdbc.password=
  5.  
  6. <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
  7. p:location="/WEB-INF/db/jdbc.properties"/>
  8.  
  9. <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"
  10. p:driverClassName="${jdbc.driverClassName}" p:url="${jdbc.url}" p:username="${jdbc.username}" p:password="${jdbc.password}"/>
  11.  
  12. <bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
  13. <property name="dataSource" ref="dataSource"/>
  14. </bean>
Add Comment
Please, Sign In to add comment