3 changed files with 10 additions and 6 deletions
@ -1,24 +1,29 @@ |
|||
package cn.chjyj.szwh.controller.api; |
|||
|
|||
import cn.chjyj.szwh.annotation.PassToken; |
|||
import cn.chjyj.szwh.controller.BaseController; |
|||
import com.alibaba.fastjson.JSONObject; |
|||
import org.springframework.boot.SpringBootVersion; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import javax.swing.*; |
|||
|
|||
/** |
|||
* test controller |
|||
*/ |
|||
|
|||
@RestController |
|||
@RequestMapping("/api/v1") |
|||
public class TestController { |
|||
public class TestController extends BaseController { |
|||
/** |
|||
* test |
|||
* @return |
|||
*/ |
|||
@PassToken |
|||
@RequestMapping("/version") |
|||
public String version(){ |
|||
return SpringBootVersion.getVersion(); |
|||
public JSONObject version(){ |
|||
jsonObject.put("data","ver:"+ SpringBootVersion.getVersion()); |
|||
jsonObject.put("code",200); |
|||
return jsonObject; |
|||
} |
|||
} |
|||
|
|||
Loading…
Reference in new issue