首页>代码>Spring+Shiro+Mybatis实现轻量级网站后台用户权限管理系统>/renren-security/renren-api/src/main/java/io/renren/api/ApiTestController.java
package io.renren.api; import io.renren.annotation.IgnoreAuth; import io.renren.annotation.LoginUser; import io.renren.entity.UserEntity; import io.renren.utils.R; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** * API测试接口 * * @author chenshun * @email sunlightcs@gmail.com * @date 2017-03-23 15:47 */ @RestController @RequestMapping("/api") public class ApiTestController { /** * 获取用户信息 */ @GetMapping("userInfo") public R userInfo(@LoginUser UserEntity user){ return R.ok().put("user", user); } /** * 忽略Token验证测试 */ @IgnoreAuth @GetMapping("notToken") public R notToken(){ return R.ok().put("msg", "无需token也能访问。。。"); } }

AprilZk LV3
2024年12月11日
sunlea LV20
2024年5月8日
cxdxfx12 LV14
2022年6月21日
汤汤汤要学编程 LV11
2022年3月31日
fanxiaolin84 LV10
2021年12月24日
543666826 LV34
2021年11月18日
sweetbox LV10
2021年8月5日
zmczp891216 LV2
2021年5月25日
tutuhero LV8
2021年5月13日
小海脑洞大开 LV11
2021年4月26日

AprilZk LV3
2024年12月11日
dapeng0011 LV15
2024年7月8日
陈小灏 LV18
2024年6月23日
szqqqaaqqa LV1
2024年6月21日
ma406805131 LV19
2024年6月2日
xuweiwowzy LV5
2024年1月14日
WBelong LV8
2023年12月27日
fff2003 LV9
2023年11月14日
2131234536546 LV7
2023年9月8日
Hachi6 LV13
2023年8月17日