AuthController.java 1.15 KB
Newer Older
licc's avatar
licc committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
/*
package com.project.shiro.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

*/
/**
 * 控制器编码范例
 *
 * @author wyy
 * @date 2019-08-20 19:57
 *//*

@Api(value = "shiro权限测试", tags = "shiro权限测试")
@RestController("adminAuthController")
@RequestMapping("/admin")
public class AuthController extends BaseController {

    */
/**
     * 测试权限
     *
     * @return
     *//*

    @ApiOperation(value = "test", notes = "测试权限", httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "test", value = "测试参数", dataType = "String")
    })
    @RequiresPermissions({"admin:test1"})
    @PostMapping(value = "/test")
    public Map<String, Object> test() {
        return getResult(123);
    }

}
*/