All Downloads are FREE. Search and download functionalities are using the official Maven repository.

mtons.shiro.controller.PermissionController Maven / Gradle / Ivy

The newest version!
package mtons.shiro.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import mtons.shiro.persist.entity.Permission;
import mtons.shiro.persist.service.PermissionService;

@Controller
@RequestMapping("/perm")
public class PermissionController extends BaseController {
	@Autowired
    private PermissionService permissionService;

	@GetMapping("/list")
    public String list() {
	    return "/shiro/perm/list";
    }

	@PostMapping("/list")
    @ResponseBody
	public ContentTable paging(String name) {
		Pageable pageable = wrapPageable();
        Page page = permissionService.paging(pageable, name);
        return new ContentTable(page);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy