Commit 19aefc8d authored by 郭人方's avatar 郭人方

docs:登陆配置说明文档

parent 9afd9cc4
# LDP 框架用户登录配置说明文档
本文档是帮助开发者快速熟悉LDP框架中的登录配置参数。
Java UaaConstantConfiguration.java文件:
```Java
@ConfigurationProperties(prefix = "ldp.uaa.constants")
@Configuration
public class UaaConstantConfiguration {
private Long token_expire_seconds;//TOKEN过期时间
private Integer validatecode_expire_seconds;//校验码有效时间
private Boolean need_validate_code;//是否需要检查校验码
private Boolean need_fail_validate;//是否启用失败次数校验
private Integer fail_times;//超过或等于最多失败次数时出现验证码
private Long fail_expire_seconds;//失败登陆redis缓存过期时间
// 资源文件根目录
private String root_dir;
@Value("${ldp.uaa.constants.static_reources_dir}")
private String static_reources_dir;//静态文件目录
@Value("${ldp.uaa.constants.need_template_cache:true}")
private Boolean need_template_cache;
@Value("${ldp.uaa.constants.refresh_seconds_end_of_session:1800}")
private Integer refresh_seconds_end_of_session;
```
配置文件
```yaml
ldp:
uaa:
constants:
# Token过期时间毫秒 JWT
token_expire_seconds: 14400000
# 验证码有效时间
validatecode_expire_seconds: 60
# 是否启用验证码
need_validate_code: true
# 是否启用失败次数检查
need_fail_validate: true
# 最多尝试失败次数,当登录失败次数大于等于5时出现输入验证码框。
fail_times: 5
# 失败次数缓存时间,毫秒单位
fail_expire_seconds: 120
# 资源文件根目录
root_dir: ${user.home}
# 静态资源文件及template,默认存储路径,请不要以‘/’ 开头与结尾
static_reources_dir: uaaui
# 是否静态模板进行缓存
need_template_cache: true
refresh_seconds_end_of_session: 1800
save-log-when-login: true
save-log-when-logout: true
query:
location: query/*.xml
dialect: mysql
cache:
redis:
host: r-uf6ofe37sshorzyjw1pd.redis.rds.aliyuncs.com
port: 6379
password: XR123456xr
database: 1
sentinel:
master: ldp-master
nodes:
- sinra-server0:6380
- sinra-server0:6381
- sinra-server0:6382
instances:
#用户会话级缓存 秒 redis过期时间
session: 3600
#应用级缓存默认不过期
application: -1
```
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment