Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- com.mysql.jdbc.Driver
- <dependency>
- <groupId>mysql</groupId>
- <artifactId>mysql-connector-java</artifactId>
- <version>8.0.11</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-jdbc</artifactId>
- <version>3.2.6.RELEASE</version>
- </dependency>
- <?xml version="1.0" encoding="UTF-8"?>
- <beans:beans xmlns:beans="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:context="http://www.springframework.org/schema/context"
- xmlns:p="http://www.springframework.org/schema/p"
- xmlns="http://www.springframework.org/schema/security"
- xsi:schemaLocation="http://www.springframework.org/schema/security
- http://www.springframework.org/schema/security/spring-security-3.2.xsd
- http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/context
- http://www.springframework.org/schema/context/spring-context-3.2.xsd">
- <http auto-config="true">
- <intercept-url pattern="/**" access="ROLE_USER"/>
- </http>
- <authentication-manager>
- <authentication-provider user-service-ref="userDetailsService"/>
- </authentication-manager>
- <beans:bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
- <beans:property name="driverClassName" value="com.mysql.jdbc.Driver"/>
- <beans:property name="url" value="jdbc:mysql://localhost:3306/fitnesTracker"/>
- <beans:property name="username" value="root"/>
- <beans:property name="password" value="*****"/>
- </beans:bean>
- <beans:bean id="userDetailsService" class="org.springframework.security.core.userdetails.jdbc.JdbcDaoImpl">
- <beans:property name="dataSource" ref="dataSource"/>
- </beans:bean>
- </beans:beans>
- <dependency>
- <groupId>mysql</groupId>
- <artifactId>mysql-connector-java</artifactId>
- <version>8.0.11</version>
- </dependency>
Add Comment
Please, Sign In to add comment