更新现有视图使用jsp视图解析器

This commit is contained in:
shuzheng 2017-03-21 13:44:55 +08:00
parent 398d20dbe0
commit dc1a00dfcc
21 changed files with 52 additions and 56 deletions

View File

@ -27,7 +27,7 @@ public class ManageController extends BaseController {
@ApiOperation(value = "后台首页")
@RequestMapping(value = "/index", method = RequestMethod.GET)
public String index() {
return "/manage/index";
return "/jsp/manage/index";
}
}

View File

@ -13,7 +13,6 @@ import com.zheng.cms.rpc.api.CmsArticleService;
import com.zheng.cms.rpc.api.CmsTopicService;
import com.zheng.common.base.BaseController;
import com.zheng.common.validator.LengthValidator;
import com.zheng.common.validator.NotNullValidator;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang.StringUtils;
@ -22,7 +21,6 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
@ -51,7 +49,7 @@ public class CmsArticleController extends BaseController {
@RequiresPermissions("cms:article:read")
@RequestMapping(value = "/index", method = RequestMethod.GET)
public String index() {
return "/manage/article/index";
return "/jsp/manage/article/index";
}
@ApiOperation(value = "文章列表")
@ -85,7 +83,7 @@ public class CmsArticleController extends BaseController {
cmsTopicExample.setOrderByClause("ctime desc");
List<CmsTopic> cmsTopics = cmsTopicService.selectByExample(cmsTopicExample);
modelMap.put("cmsTopics", cmsTopics);
return "/manage/article/create";
return "/jsp/manage/article/create";
}
@ApiOperation(value = "新增文章")
@ -126,7 +124,7 @@ public class CmsArticleController extends BaseController {
CmsArticle article = cmsArticleService.selectByPrimaryKey(id);
modelMap.put("cmsTopics", cmsTopics);
modelMap.put("article", article);
return "/manage/article/update";
return "/jsp/manage/article/update";
}
@ApiOperation(value = "修改文章")

View File

@ -43,7 +43,7 @@ public class CmsCategoryController extends BaseController {
@RequiresPermissions("cms:category:read")
@RequestMapping(value = "/index", method = RequestMethod.GET)
public String index() {
return "/manage/category/index";
return "/jsp/manage/category/index";
}
@ApiOperation(value = "类目列表")
@ -73,7 +73,7 @@ public class CmsCategoryController extends BaseController {
@RequiresPermissions("cms:category:create")
@RequestMapping(value = "/create", method = RequestMethod.GET)
public String create() {
return "/manage/category/create";
return "/jsp/manage/category/create";
}
@ApiOperation(value = "新增类目")
@ -110,7 +110,7 @@ public class CmsCategoryController extends BaseController {
public String update(@PathVariable("id") int id, ModelMap modelMap) {
CmsCategory category = cmsCategoryService.selectByPrimaryKey(id);
modelMap.put("category", category);
return "/manage/category/update";
return "/jsp/manage/category/update";
}
@ApiOperation(value = "修改类目")

View File

@ -39,7 +39,7 @@ public class CmsCommentController extends BaseController {
@RequiresPermissions("cms:comment:read")
@RequestMapping(value = "/index", method = RequestMethod.GET)
public String index() {
return "/manage/comment/index";
return "/jsp/manage/comment/index";
}
@ApiOperation(value = "评论列表")
@ -69,7 +69,7 @@ public class CmsCommentController extends BaseController {
@RequiresPermissions("cms:comment:create")
@RequestMapping(value = "/create", method = RequestMethod.GET)
public String create() {
return "/manage/comment/create";
return "/jsp/manage/comment/create";
}
@ApiOperation(value = "新增评论")
@ -98,7 +98,7 @@ public class CmsCommentController extends BaseController {
public String update(@PathVariable("id") int id, ModelMap modelMap) {
CmsComment comment = cmsCommentService.selectByPrimaryKey(id);
modelMap.put("comment", comment);
return "/manage/comment/update";
return "/jsp/manage/comment/update";
}
@ApiOperation(value = "修改评论")

View File

@ -43,7 +43,7 @@ public class CmsMenuController extends BaseController {
@RequiresPermissions("cms:menu:read")
@RequestMapping(value = "/index", method = RequestMethod.GET)
public String index() {
return "/manage/menu/index";
return "/jsp/manage/menu/index";
}
@ApiOperation(value = "评论列表")
@ -73,7 +73,7 @@ public class CmsMenuController extends BaseController {
@RequiresPermissions("cms:menu:create")
@RequestMapping(value = "/create", method = RequestMethod.GET)
public String create() {
return "/manage/menu/create";
return "/jsp/manage/menu/create";
}
@ApiOperation(value = "新增菜单")
@ -109,7 +109,7 @@ public class CmsMenuController extends BaseController {
public String update(@PathVariable("id") int id, ModelMap modelMap) {
CmsMenu menu = cmsMenuService.selectByPrimaryKey(id);
modelMap.put("menu", menu);
return "/manage/menu/update";
return "/jsp/manage/menu/update";
}
@ApiOperation(value = "修改菜单")

View File

@ -43,7 +43,7 @@ public class CmsPageController extends BaseController {
@RequiresPermissions("cms:page:read")
@RequestMapping(value = "/index", method = RequestMethod.GET)
public String index() {
return "/manage/page/index";
return "/jsp/manage/page/index";
}
@ApiOperation(value = "评论列表")
@ -73,7 +73,7 @@ public class CmsPageController extends BaseController {
@RequiresPermissions("cms:page:create")
@RequestMapping(value = "/create", method = RequestMethod.GET)
public String create() {
return "/manage/page/create";
return "/jsp/manage/page/create";
}
@ApiOperation(value = "新增单页")
@ -110,7 +110,7 @@ public class CmsPageController extends BaseController {
public String update(@PathVariable("id") int id, ModelMap modelMap) {
CmsPage page = cmsPageService.selectByPrimaryKey(id);
modelMap.put("page", page);
return "/manage/page/update";
return "/jsp/manage/page/update";
}
@ApiOperation(value = "修改单页")

View File

@ -43,7 +43,7 @@ public class CmsSettingController extends BaseController {
@RequiresPermissions("cms:setting:read")
@RequestMapping(value = "/index", method = RequestMethod.GET)
public String index() {
return "/manage/setting/index";
return "/jsp/manage/setting/index";
}
@ApiOperation(value = "评论列表")
@ -73,7 +73,7 @@ public class CmsSettingController extends BaseController {
@RequiresPermissions("cms:setting:create")
@RequestMapping(value = "/create", method = RequestMethod.GET)
public String create() {
return "/manage/setting/create";
return "/jsp/manage/setting/create";
}
@ApiOperation(value = "新增设置")
@ -107,7 +107,7 @@ public class CmsSettingController extends BaseController {
public String update(@PathVariable("id") int id, ModelMap modelMap) {
CmsSetting setting = cmsSettingService.selectByPrimaryKey(id);
modelMap.put("setting", setting);
return "/manage/setting/update";
return "/jsp/manage/setting/update";
}
@ApiOperation(value = "修改设置")

View File

@ -43,7 +43,7 @@ public class CmsTagController extends BaseController {
@RequiresPermissions("cms:tag:read")
@RequestMapping(value = "/index", method = RequestMethod.GET)
public String index() {
return "/manage/tag/index";
return "/jsp/manage/tag/index";
}
@ApiOperation(value = "评论列表")
@ -73,7 +73,7 @@ public class CmsTagController extends BaseController {
@RequiresPermissions("cms:tag:create")
@RequestMapping(value = "/create", method = RequestMethod.GET)
public String create() {
return "/manage/tag/create";
return "/jsp/manage/tag/create";
}
@ApiOperation(value = "新增标签")
@ -110,7 +110,7 @@ public class CmsTagController extends BaseController {
public String update(@PathVariable("id") int id, ModelMap modelMap) {
CmsTag tag = cmsTagService.selectByPrimaryKey(id);
modelMap.put("tag", tag);
return "/manage/tag/update";
return "/jsp/manage/tag/update";
}
@ApiOperation(value = "修改标签")

View File

@ -43,7 +43,7 @@ public class CmsTopicController extends BaseController {
@RequiresPermissions("cms:topic:read")
@RequestMapping(value = "/index", method = RequestMethod.GET)
public String index() {
return "/manage/topic/index";
return "/jsp/manage/topic/index";
}
@ApiOperation(value = "评论列表")
@ -73,7 +73,7 @@ public class CmsTopicController extends BaseController {
@RequiresPermissions("cms:topic:create")
@RequestMapping(value = "/create", method = RequestMethod.GET)
public String create() {
return "/manage/topic/create";
return "/jsp/manage/topic/create";
}
@ApiOperation(value = "新增专题")
@ -109,7 +109,7 @@ public class CmsTopicController extends BaseController {
public String update(@PathVariable("id") int id, ModelMap modelMap) {
CmsTopic topic = cmsTopicService.selectByPrimaryKey(id);
modelMap.put("topic", topic);
return "/manage/topic/update";
return "/jsp/manage/topic/update";
}
@ApiOperation(value = "修改专题")

View File

@ -5,7 +5,6 @@ import com.zheng.cms.rpc.api.CmsCategoryService;
import com.zheng.cms.rpc.api.CmsMenuService;
import com.zheng.cms.rpc.api.CmsTagService;
import com.zheng.common.base.BaseController;
import io.swagger.annotations.Api;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -51,7 +50,7 @@ public class IndexController extends BaseController {
cmsTagExample.setOrderByClause("orders asc");
List<CmsTag> tags = cmsTagService.selectByExample(cmsTagExample);
model.addAttribute("tags", tags);
return "/index";
return "/jsp/index";
}
}

View File

@ -32,13 +32,13 @@ public abstract class BaseController {
}
// shiro没有权限异常
if (exception instanceof UnauthorizedException) {
return "/403";
return "/jsp/403";
}
// shiro会话已过期异常
if (exception instanceof InvalidSessionException) {
return "/error";
return "/jsp/error";
}
return "/error";
return "/jsp/error";
}
}

View File

@ -50,7 +50,7 @@ public class ManageController extends BaseController {
UpmsUser upmsUser = upmsApiService.selectUpmsUserByUsername(username);
List<UpmsPermission> upmsPermissions = upmsApiService.selectUpmsPermissionByUpmsUserId(upmsUser.getUserId());
modelMap.put("upmsPermissions", upmsPermissions);
return "/manage/index";
return "/jsp/manage/index";
}
}

View File

@ -1,6 +1,5 @@
package com.zheng.upms.server.controller;
import com.alibaba.fastjson.JSONObject;
import com.zheng.common.base.BaseController;
import com.zheng.common.util.RedisUtil;
import com.zheng.upms.client.shiro.session.UpmsSession;
@ -105,7 +104,7 @@ public class SSOController extends BaseController {
_log.debug("认证中心帐号通过带code回跳{}", backurl);
return "redirect:" + backurl;
}
return "/sso/login";
return "/jsp/sso/login";
}
@ApiOperation(value = "登录")

View File

@ -38,7 +38,7 @@ public class UpmsLogController extends BaseController {
@RequiresPermissions("upms:log:read")
@RequestMapping(value = "/index", method = RequestMethod.GET)
public String index() {
return "/manage/log/index";
return "/jsp/manage/log/index";
}
@ApiOperation(value = "日志列表")

View File

@ -43,7 +43,7 @@ public class UpmsOrganizationController extends BaseController {
@RequiresPermissions("upms:organization:read")
@RequestMapping(value = "/index", method = RequestMethod.GET)
public String index() {
return "/manage/organization/index";
return "/jsp/manage/organization/index";
}
@ApiOperation(value = "组织列表")
@ -73,7 +73,7 @@ public class UpmsOrganizationController extends BaseController {
@RequiresPermissions("upms:organization:create")
@RequestMapping(value = "/create", method = RequestMethod.GET)
public String create() {
return "/manage/organization/create";
return "/jsp/manage/organization/create";
}
@ApiOperation(value = "新增组织")
@ -109,7 +109,7 @@ public class UpmsOrganizationController extends BaseController {
public String update(@PathVariable("id") int id, ModelMap modelMap) {
UpmsOrganization organization = upmsOrganizationService.selectByPrimaryKey(id);
modelMap.put("organization", organization);
return "/manage/organization/update";
return "/jsp/manage/organization/update";
}
@ApiOperation(value = "修改组织")

View File

@ -50,7 +50,7 @@ public class UpmsPermissionController extends BaseController {
@RequiresPermissions("upms:permission:read")
@RequestMapping(value = "/index", method = RequestMethod.GET)
public String index() {
return "/manage/permission/index";
return "/jsp/manage/permission/index";
}
@ApiOperation(value = "权限列表")
@ -148,7 +148,7 @@ public class UpmsPermissionController extends BaseController {
.andStatusEqualTo((byte) 1);
List<UpmsSystem> upmsSystems = upmsSystemService.selectByExample(upmsSystemExample);
modelMap.put("upmsSystems", upmsSystems);
return "/manage/permission/create";
return "/jsp/manage/permission/create";
}
@ApiOperation(value = "新增权限")
@ -190,7 +190,7 @@ public class UpmsPermissionController extends BaseController {
UpmsPermission permission = upmsPermissionService.selectByPrimaryKey(id);
modelMap.put("permission", permission);
modelMap.put("upmsSystems", upmsSystems);
return "/manage/permission/update";
return "/jsp/manage/permission/update";
}
@ApiOperation(value = "修改权限")

View File

@ -53,7 +53,7 @@ public class UpmsRoleController extends BaseController {
@RequiresPermissions("upms:role:read")
@RequestMapping(value = "/index", method = RequestMethod.GET)
public String index() {
return "/manage/role/index";
return "/jsp/manage/role/index";
}
@ApiOperation(value = "角色权限")
@ -62,7 +62,7 @@ public class UpmsRoleController extends BaseController {
public String permission(@PathVariable("id") int id, ModelMap modelMap) {
UpmsRole role = upmsRoleService.selectByPrimaryKey(id);
modelMap.put("role", role);
return "/manage/role/permission";
return "/jsp/manage/role/permission";
}
@ApiOperation(value = "角色权限")
@ -119,7 +119,7 @@ public class UpmsRoleController extends BaseController {
@RequiresPermissions("upms:role:create")
@RequestMapping(value = "/create", method = RequestMethod.GET)
public String create() {
return "/manage/role/create";
return "/jsp/manage/role/create";
}
@ApiOperation(value = "新增角色")
@ -157,7 +157,7 @@ public class UpmsRoleController extends BaseController {
public String update(@PathVariable("id") int id, ModelMap modelMap) {
UpmsRole role = upmsRoleService.selectByPrimaryKey(id);
modelMap.put("role", role);
return "/manage/role/update";
return "/jsp/manage/role/update";
}
@ApiOperation(value = "修改角色")

View File

@ -31,7 +31,7 @@ public class UpmsSessionController extends BaseController {
@RequiresPermissions("upms:session:read")
@RequestMapping(value = "/index", method = RequestMethod.GET)
public String index() {
return "/manage/session/index";
return "/jsp/manage/session/index";
}
@ApiOperation(value = "会话列表")

View File

@ -43,7 +43,7 @@ public class UpmsSystemController extends BaseController {
@RequiresPermissions("upms:system:read")
@RequestMapping(value = "/index", method = RequestMethod.GET)
public String index() {
return "/manage/system/index";
return "/jsp/manage/system/index";
}
@ApiOperation(value = "系统列表")
@ -73,7 +73,7 @@ public class UpmsSystemController extends BaseController {
@RequiresPermissions("upms:system:create")
@RequestMapping(value = "/create", method = RequestMethod.GET)
public String create() {
return "/manage/system/create";
return "/jsp/manage/system/create";
}
@ApiOperation(value = "新增系统")
@ -111,7 +111,7 @@ public class UpmsSystemController extends BaseController {
public String update(@PathVariable("id") int id, ModelMap modelMap) {
UpmsSystem system = upmsSystemService.selectByPrimaryKey(id);
modelMap.put("system", system);
return "/manage/system/update";
return "/jsp/manage/system/update";
}
@ApiOperation(value = "修改系统")

View File

@ -62,7 +62,7 @@ public class UpmsUserController extends BaseController {
@RequiresPermissions("upms:user:read")
@RequestMapping(value = "/index", method = RequestMethod.GET)
public String index() {
return "/manage/user/index";
return "/jsp/manage/user/index";
}
@ApiOperation(value = "用户组织")
@ -78,7 +78,7 @@ public class UpmsUserController extends BaseController {
List<UpmsUserOrganization> upmsUserOrganizations = upmsUserOrganizationService.selectByExample(upmsUserOrganizationExample);
modelMap.put("upmsOrganizations", upmsOrganizations);
modelMap.put("upmsUserOrganizations", upmsUserOrganizations);
return "/manage/user/organization";
return "/jsp/manage/user/organization";
}
@ApiOperation(value = "用户组织")
@ -120,7 +120,7 @@ public class UpmsUserController extends BaseController {
List<UpmsUserRole> upmsUserRoles = upmsUserRoleService.selectByExample(upmsUserRoleExample);
modelMap.put("upmsRoles", upmsRoles);
modelMap.put("upmsUserRoles", upmsUserRoles);
return "/manage/user/role";
return "/jsp/manage/user/role";
}
@ApiOperation(value = "用户角色")
@ -176,7 +176,7 @@ public class UpmsUserController extends BaseController {
@RequiresPermissions("upms:user:create")
@RequestMapping(value = "/create", method = RequestMethod.GET)
public String create() {
return "/manage/user/create";
return "/jsp/manage/user/create";
}
@ApiOperation(value = "新增用户")
@ -217,7 +217,7 @@ public class UpmsUserController extends BaseController {
public String update(@PathVariable("id") int id, ModelMap modelMap) {
UpmsUser user = upmsUserService.selectByPrimaryKey(id);
modelMap.put("user", user);
return "/manage/user/update";
return "/jsp/manage/user/update";
}
@ApiOperation(value = "修改用户")

View File

@ -9,7 +9,7 @@
http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<!-- 根目录'/'对应页面 -->
<mvc:view-controller path="/" view-name="/index"/>
<mvc:view-controller path="/" view-name="/jsp/index"/>
<!-- 拦截器 -->
<mvc:interceptors>