6 changed files with 69 additions and 55 deletions
@ -0,0 +1,42 @@ |
|||
package com.zdxt.knowledge.domain; |
|||
|
|||
import org.springframework.boot.context.properties.ConfigurationProperties; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
@Component |
|||
@ConfigurationProperties(prefix = "wechat.jwt") |
|||
public class JwtProperties { |
|||
/** |
|||
* 用户端微信用户生成jwt令牌相关配置 |
|||
*/ |
|||
private static String userSecretKey; |
|||
private static long userTtl; |
|||
private static String userTokenName; |
|||
|
|||
public static String getUserSecretKey() { |
|||
return userSecretKey; |
|||
} |
|||
|
|||
public void setUserSecretKey(String userSecretKey) { |
|||
JwtProperties.userSecretKey = userSecretKey; |
|||
} |
|||
|
|||
public static long getUserTtl() { |
|||
return userTtl; |
|||
} |
|||
|
|||
public void setUserTtl(long userTtl) { |
|||
JwtProperties.userTtl = userTtl; |
|||
} |
|||
|
|||
public static String getUserTokenName() { |
|||
return userTokenName; |
|||
} |
|||
|
|||
public void setUserTokenName(String userTokenName) { |
|||
JwtProperties.userTokenName = userTokenName; |
|||
} |
|||
|
|||
} |
|||
|
|||
|
|||
@ -1,20 +0,0 @@ |
|||
package com.zdxt.knowledge.jwt; |
|||
|
|||
import lombok.Data; |
|||
import org.springframework.boot.context.properties.ConfigurationProperties; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
@Component |
|||
@ConfigurationProperties(prefix = "wechat.jwt") |
|||
@Data |
|||
public class JwtProperties { |
|||
/** |
|||
* 用户端微信用户生成jwt令牌相关配置 |
|||
*/ |
|||
private String userSecretKey; |
|||
private long userTtl; |
|||
private String userTokenName; |
|||
|
|||
} |
|||
|
|||
|
|||
Loading…
Reference in new issue