package com.xiaopeng.vehicleConvoy.controller; import com.xiaopeng.common.core.domain.R; import com.xiaopeng.vehicleConvoy.util.MinistryOfTransport; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; @RestController @RequestMapping("/") public class HttpTestController { @Resource private MinistryOfTransport ministryOfTransport; /** * 测试上传数据接口 * 用于验证上传数据的准确性 * 模拟交通部接口 */ @ResponseBody @RequestMapping("/base/v0.1/testPush") public R testPush(){ try { String token = ministryOfTransport.getToken(); return R.ok(token); }catch (Exception e){ e.printStackTrace(); return R.fail(e.getMessage()); } } }