删除冗余文件

master
gk 2022-02-20 10:53:57 +08:00
parent de8473b698
commit 723558ffdf
3 changed files with 4 additions and 41 deletions

View File

@ -5,10 +5,6 @@ public interface DemoService {
/**
* 访AccessToken
*/
String getAccessToken();
String hello();
/**
* 访AccessToken 使
*/
String refreshAccessToken();
}

View File

@ -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;
}
}

View File

@ -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 "";
}
}