实现用户仅能查看自己提交的文件
This commit is contained in:
@@ -2,9 +2,16 @@ package com.fjy.spring.controller;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.support.SessionStatus;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
@Controller
|
||||
public class NavController {
|
||||
@Resource
|
||||
HttpServletRequest request;
|
||||
|
||||
@GetMapping(value = {"index",""})
|
||||
public String toLoginPage(){
|
||||
return "login";
|
||||
@@ -25,6 +32,13 @@ public class NavController {
|
||||
return "/home/home";
|
||||
}
|
||||
|
||||
@GetMapping(value = {"/logout"})
|
||||
public String toLogOut(SessionStatus status){
|
||||
//request.getSession().getAttribute(USER_SESSION_KEY).invalidate();
|
||||
status.setComplete();
|
||||
return "login";
|
||||
}
|
||||
|
||||
@GetMapping(value = {"/home/feedback"})
|
||||
public String toFeedbackPage(){
|
||||
return "/home/feedback";
|
||||
@@ -55,7 +69,6 @@ public class NavController {
|
||||
return "/home/homework";
|
||||
}
|
||||
|
||||
|
||||
@GetMapping(value = {"/home/user"})
|
||||
public String toUserPage(){
|
||||
return "/home/user";
|
||||
|
||||
Reference in New Issue
Block a user