Commit 3d5d3f7c by stylefeng

测试鉴权接口

parent 3a63dce2
package com.stylefeng.guns.modular.api;
import com.stylefeng.guns.core.base.controller.BaseController;
import com.stylefeng.guns.core.util.JwtTokenUtil;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
/**
* 接口控制器提供
*
* @author stylefeng
* @Date 2018/7/20 23:39
*/
@RestController
@RequestMapping("/gunsapi")
public class ApiController extends BaseController {
/**
* 测试接口是否走鉴权
*/
@RequestMapping(value = "/test", method = RequestMethod.POST)
public Object test() {
return SUCCESS_TIP;
}
/**
* 模拟生成一个token
*/
public static void main(String[] args) {
System.out.println(JwtTokenUtil.generateToken("aaa", null));
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment