根据this链接,我正在尝试为“记住我”功能实现持久令牌方法。令牌存储在我的数据库中(postgres)。我正确地设置了数据源,但是,当我尝试这样做时:
<remember-me data-source-ref="dataSource" />
我的数据库不会自动填充令牌数据。否则,“记住我”功能很有效(只有数据库不会自动填充)。有什么想法吗?
表ddl:
create table users(
uid serial primary key,
username varchar(255) not null,
password varchar(255) not null,
firstname varchar(255) not null,
lastname varchar(255) not null,
enabled boolean not null,
constraint cs_username_unq unique(username),
constraint cs_uid_username_unq unique(uid, username)
);
create table authorities (
username varchar(255) not null,
authority varchar(255) not null,
constraint fk_authorities_users foreign key(username) references users(username)
);
create unique index ix_auth_username on authorities (username,authority);
create table persistent_logins (
username varchar(255) not null,
series varchar(255) primary key,
token varchar(255) not null,
last_used timestamp not null
);