|
@@ -20,7 +20,7 @@ public class AlgorithmPlatform {
|
|
|
@Resource
|
|
|
OauthParameter oauthParameter;
|
|
|
@Resource
|
|
|
- StringRedisTemplate redisTemplate;
|
|
|
+ StringRedisTemplate stringRedisTemplate;
|
|
|
@Resource
|
|
|
CloseableHttpClient closeableHttpClient;
|
|
|
@Resource
|
|
@@ -45,7 +45,7 @@ public class AlgorithmPlatform {
|
|
|
@SneakyThrows
|
|
|
private String getToken() {
|
|
|
|
|
|
- String token = redisTemplate.opsForValue().get(TOKEN_KEY);
|
|
|
+ String token = stringRedisTemplate.opsForValue().get(TOKEN_KEY);
|
|
|
if (ObjectUtil.isNull(token)) {//token失效重新获取
|
|
|
String tokenUri = oauthParameter.getTokenUri();
|
|
|
String appid = oauthParameter.getAppid();
|
|
@@ -58,7 +58,7 @@ public class AlgorithmPlatform {
|
|
|
token = dataNode.path("access_token").asText();
|
|
|
if (ObjectUtil.isNotNull(token)) {
|
|
|
int expiresSec = dataNode.path("expires_in_sec").asInt();
|
|
|
- redisTemplate.opsForValue().set(TOKEN_KEY, token, expiresSec / 60);
|
|
|
+ stringRedisTemplate.opsForValue().set(TOKEN_KEY, token, expiresSec / 60);
|
|
|
}
|
|
|
}
|
|
|
}
|