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