tao.mo

调整查询版本号接口为get

mt
2022年11月23日18:32:51
......@@ -27,8 +27,6 @@ public class HsCodeInterface {
@Autowired
IClearApiHsCodeLogService iClearApiHsCodeLogService;
//当前版本号
final String VERSION = "1.3";
@ApiOperation(value = "获取hscode数据", httpMethod = "POST", notes = "ex: http://192.168.1.71:8080/hscode/hscodeRequest")
@PostMapping("/hscodeRequest")
......@@ -76,12 +74,4 @@ public class HsCodeInterface {
iClearApiHsCodeLogService.saveIClearApiHsCodeLog(iclearApiHsCodeLog);
}
}
@ApiOperation(value = "获取当前API版本", httpMethod = "POST", notes = "ex: http://192.168.1.71:8080/hscode/version")
@PostMapping("/version")
@ResponseBody
public String version(HttpServletRequest request) {
String msg = "当前版本号为:" + this.VERSION;
return msg;
}
}
......
package com.erry.iclear.dateInterface.api;
import com.erry.iclear.dateInterface.api.request.HsCodeParam;
import com.erry.iclear.dateInterface.api.response.ResultHsCode;
import com.erry.iclear.dateInterface.entity.IClearApiHsCodeLog;
import com.erry.iclear.dateInterface.service.HsCodeService;
import com.erry.iclear.dateInterface.service.IClearApiHsCodeLogService;
import com.erry.iclear.dateInterface.util.StringUtil;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.Date;
/**
* @author Administrator
* /hscode/hscodeRequest
*/
@RestController
@RequestMapping("/version")
@Slf4j
public class VersionInterface {
//当前版本号
final String VERSION = "1.3";
@ApiOperation(value = "获取当前API版本", httpMethod = "GET", notes = "ex: http://192.168.1.71:8080/version/version")
@GetMapping("/version")
@ResponseBody
public String version(HttpServletRequest request) {
String msg = "当前API版本号为:" + this.VERSION;
return msg;
}
}