跳到主要内容

有效期配置和读取

  1. shopTNT中涉及到有效期设置应该定义在application.properties中
  2. 以shopTNT.timeout开头
  3. 相应的功能、配置项及默认值:
功能配置项默认值单位
access_token有效期access_token15分钟
refresh_token有效期refresh_token30分钟
图片验证码有效期captcha10分钟
短信验证码有效期smscode10分钟

相关类规定

相关类的定义在:

com.enation.app.shopTNT.framework.shopTNTConfig

相应的属性名

class shopTNTConfig{
int accessTokenTimeout;
int refreshTokenTimeout;
int captchaTimout;
int smscodeTimout;
//other config
}

参考文档

https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html

参考类:

com.enation.app.shopTNT.framework.redis.configure.RedisConnectionConfig