Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- auth
- .jdbcAuthentication()
- .dataSource(dataSource).passwordEncoder(new Md5PasswordEncoder())
- .usersByUsernameQuery("select username,password,enabled from user where username=?")
- .authoritiesByUsernameQuery("SELECT role from user_role inner join user on user.id_user_rol = user_role.id where user.username=?");
- CREATE DATABASE db_srp;
- USE db_srp;
- CREATE TABLE user_role(
- id int auto_increment,
- role varchar(15),
- PRIMARY KEY(id)
- );
- CREATE TABLE user(
- id int auto_increment,
- username varchar(50),
- password varchar(100),
- enabled boolean,
- id_user_rol int,
- PRIMARY KEY(id),
- FOREIGN KEY(id_user_rol) REFERENCES user_role(id)
Add Comment
Please, Sign In to add comment