tao.mo

获取token频率调整为每次刷新获取

mt
2022年12月7日15:57:23
...@@ -23,7 +23,7 @@ import java.util.Date; ...@@ -23,7 +23,7 @@ import java.util.Date;
23 @Slf4j 23 @Slf4j
24 public class VersionInterface { 24 public class VersionInterface {
25 //当前版本号 25 //当前版本号
26 - final String VERSION = "1.3"; 26 + final String VERSION = "1.4";
27 27
28 @ApiOperation(value = "获取当前API版本", httpMethod = "GET", notes = "ex: http://192.168.1.71:8080/version/version") 28 @ApiOperation(value = "获取当前API版本", httpMethod = "GET", notes = "ex: http://192.168.1.71:8080/version/version")
29 @GetMapping("/version") 29 @GetMapping("/version")
......
...@@ -55,11 +55,10 @@ public class IClearApiTask { ...@@ -55,11 +55,10 @@ public class IClearApiTask {
55 } 55 }
56 } 56 }
57 /** 57 /**
58 - * 获取token 58 + * 每次请求获取最新token
59 * @throws Exception 59 * @throws Exception
60 */ 60 */
61 private void getToken() throws Exception{ 61 private void getToken() throws Exception{
62 - if(token == null){
63 try { 62 try {
64 //获取token 63 //获取token
65 TokenResult tokenResult = apiService.getToken(); 64 TokenResult tokenResult = apiService.getToken();
...@@ -69,7 +68,6 @@ public class IClearApiTask { ...@@ -69,7 +68,6 @@ public class IClearApiTask {
69 }catch(Exception ex){ 68 }catch(Exception ex){
70 log.error(ex.getMessage(),ex); 69 log.error(ex.getMessage(),ex);
71 } 70 }
72 - }
73 if(this.token == null){ 71 if(this.token == null){
74 throw new Exception("获取token失败!"); 72 throw new Exception("获取token失败!");
75 } 73 }
......