Spring Security(Third Edition)
上QQ阅读APP看书,第一时间看更新

Defining users

The next script is in charge of defining the users in our application. The included SQL statement creates the same users that we have used throughout the entire book so far. The file also adds an additional user, disabled1@example.com, who will not be able to log in since we indicate the user as disabled:

    //src/main/resources/database/h2/security-users.sql

insert into users (username,password,enabled)
values ('user1@example.com','user1',1);
insert into users (username,password,enabled)
values ('admin1@example.com','admin1',1);
insert into users (username,password,enabled)
values ('user2@example.com','admin1',1);
insert into users (username,password,enabled)
values ('disabled1@example.com','disabled1',0);