| | |
| | | package com.vincent.rsf.server.common.config; |
| | | |
| | | import com.vincent.rsf.common.enums.SystemModeType; |
| | | import lombok.Data; |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 系统配置属性 |
| | |
| | | */ |
| | | private String tokenKey; |
| | | |
| | | /** |
| | | * 系统名称 |
| | | */ |
| | | private String systemName; |
| | | |
| | | /** |
| | | * 系统版本 |
| | | */ |
| | | private String systemVersion; |
| | | |
| | | /** |
| | | * 系统模式( ONLINE / OFFLINE ) |
| | | */ |
| | | private String systemMode; |
| | | |
| | | /** |
| | | * 超级管理员 |
| | | */ |
| | | private String superUsername; |
| | | |
| | | /** |
| | | * 验证码长度 |
| | | */ |
| | | private Integer codeLength = 4; |
| | | |
| | | /** |
| | | * 验证码有效期 ( 秒 ) |
| | | */ |
| | | private Integer codeTime = 300; |
| | | |
| | | /** |
| | | * 超级验证码 |
| | | */ |
| | | private String securityCode; |
| | | |
| | | public List<String> getSuperUserList() { |
| | | return Arrays.stream(superUsername.split(",")).collect(Collectors.toList()); |
| | | } |
| | | |
| | | public SystemModeType getSystemMode() { |
| | | return SystemModeType.valueOf(systemMode); |
| | | } |
| | | |
| | | } |