Java tutorial
/** * Copyright © 2012-2013 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); */ package com.lcw.one.modules.sys.web; import com.lcw.one.common.config.Global; import com.lcw.one.common.persistence.Page; import com.lcw.one.common.web.BaseController; import com.lcw.one.modules.sys.entity.Dict; import com.lcw.one.modules.sys.service.DictService; import org.apache.commons.lang3.StringUtils; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.mvc.support.RedirectAttributes; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.util.List; /** * Controller * @author ThinkGem * @version 2013-3-23 */ @Controller @RequestMapping(value = "${adminPath}/sys/dict") public class DictController extends BaseController { @RequiresPermissions("sys:dict:view") @RequestMapping(value = { "list", "" }) public String list() { return "modules/sys/dictList"; } @RequiresPermissions("sys:dict:view") @RequestMapping(value = "form") public String form(String id, Model model) { model.addAttribute("id", id); return "modules/sys/dictForm"; } }