Guest User

Untitled

a guest
Jul 25th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.01 KB | None | 0 0
  1. com.mysql.jdbc.Driver
  2.  
  3. <dependency>
  4. <groupId>mysql</groupId>
  5. <artifactId>mysql-connector-java</artifactId>
  6. <version>8.0.11</version>
  7. </dependency>
  8. <dependency>
  9. <groupId>org.springframework</groupId>
  10. <artifactId>spring-jdbc</artifactId>
  11. <version>3.2.6.RELEASE</version>
  12. </dependency>
  13.  
  14. <?xml version="1.0" encoding="UTF-8"?>
  15. <beans:beans xmlns:beans="http://www.springframework.org/schema/beans"
  16. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  17. xmlns:context="http://www.springframework.org/schema/context"
  18. xmlns:p="http://www.springframework.org/schema/p"
  19. xmlns="http://www.springframework.org/schema/security"
  20. xsi:schemaLocation="http://www.springframework.org/schema/security
  21. http://www.springframework.org/schema/security/spring-security-3.2.xsd
  22. http://www.springframework.org/schema/beans
  23. http://www.springframework.org/schema/beans/spring-beans.xsd
  24. http://www.springframework.org/schema/context
  25. http://www.springframework.org/schema/context/spring-context-3.2.xsd">
  26.  
  27. <http auto-config="true">
  28. <intercept-url pattern="/**" access="ROLE_USER"/>
  29. </http>
  30. <authentication-manager>
  31. <authentication-provider user-service-ref="userDetailsService"/>
  32. </authentication-manager>
  33. <beans:bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
  34. <beans:property name="driverClassName" value="com.mysql.jdbc.Driver"/>
  35. <beans:property name="url" value="jdbc:mysql://localhost:3306/fitnesTracker"/>
  36. <beans:property name="username" value="root"/>
  37. <beans:property name="password" value="*****"/>
  38. </beans:bean>
  39.  
  40. <beans:bean id="userDetailsService" class="org.springframework.security.core.userdetails.jdbc.JdbcDaoImpl">
  41. <beans:property name="dataSource" ref="dataSource"/>
  42. </beans:bean>
  43. </beans:beans>
  44.  
  45. <dependency>
  46. <groupId>mysql</groupId>
  47. <artifactId>mysql-connector-java</artifactId>
  48. <version>8.0.11</version>
  49. </dependency>
Add Comment
Please, Sign In to add comment