diff --git a/modules/kdayun-demo/src/main/java/com/kdayun/demo/service/DemoService.java b/modules/kdayun-demo/src/main/java/com/kdayun/demo/service/DemoService.java index 8e14de5..a1bac40 100644 --- a/modules/kdayun-demo/src/main/java/com/kdayun/demo/service/DemoService.java +++ b/modules/kdayun-demo/src/main/java/com/kdayun/demo/service/DemoService.java @@ -5,10 +5,6 @@ public interface DemoService { /** * 获取百度云的访问AccessToken */ - String getAccessToken(); + String hello(); - /** - * 刷新百度云的访问AccessToken 失效时候使用 - */ - String refreshAccessToken(); } diff --git a/modules/kdayun-demo/src/main/java/com/kdayun/demo/service/impl/DemoServiceImpl.java b/modules/kdayun-demo/src/main/java/com/kdayun/demo/service/impl/DemoServiceImpl.java index ae1580a..cdf739b 100644 --- a/modules/kdayun-demo/src/main/java/com/kdayun/demo/service/impl/DemoServiceImpl.java +++ b/modules/kdayun-demo/src/main/java/com/kdayun/demo/service/impl/DemoServiceImpl.java @@ -1,29 +1,17 @@ package com.kdayun.demo.service.impl; -import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import com.kdayun.demo.service.DemoService; -import com.kdayun.demo.util.Utils; @Service public class DemoServiceImpl implements DemoService { - public static String baiduAccessToken = ""; @Override - public String getAccessToken() { - if (StringUtils.isNotBlank(baiduAccessToken)) { - return baiduAccessToken; - } else { - baiduAccessToken = Utils.getAccessToken(); - } - return baiduAccessToken; + public String hello() { + + return "hello"; } - @Override - public String refreshAccessToken() { - baiduAccessToken = Utils.getAccessToken(); - return baiduAccessToken; - } } diff --git a/modules/kdayun-demo/src/main/java/com/kdayun/demo/util/Utils.java b/modules/kdayun-demo/src/main/java/com/kdayun/demo/util/Utils.java deleted file mode 100644 index b621c48..0000000 --- a/modules/kdayun-demo/src/main/java/com/kdayun/demo/util/Utils.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.kdayun.demo.util; - -import org.springframework.beans.factory.annotation.Value; - -public class Utils { - - @Value("${demo.appid}") - private String appid; - @Value("${demo.appkey}") - private String appkey; - @Value("${demo.secretkey}") - private String secretkey; - - /** - * 请求获取微信的授权Accesstoken - */ - public static String getAccessToken() { - return ""; - } - -}