#IB1BC9 客户端调用单点注销接口或者maxkey-hmt管理后台页面退出报错:Circular view path [logout]
This commit is contained in:
@@ -41,6 +41,7 @@ import org.springframework.http.MediaType;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
@@ -65,6 +66,7 @@ public class LogoutEndpoint {
|
||||
*/
|
||||
@Operation(summary = "前端注销接口", description = "前端注销接口",method="GET")
|
||||
@GetMapping(value={"/logout"}, produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
@ResponseBody
|
||||
public Message<String> logout(@CurrentUser UserInfo currentUser){
|
||||
//if logined in have onlineTicket ,need remove or logout back
|
||||
String sessionId = currentUser.getSessionId();
|
||||
|
||||
@@ -26,6 +26,8 @@ import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
|
||||
@Controller
|
||||
@@ -36,6 +38,7 @@ public class LogoutEndpoint {
|
||||
SessionManager sessionManager;
|
||||
|
||||
@GetMapping(value={"/logout"})
|
||||
@ResponseBody
|
||||
public Message<?> logout(HttpServletRequest request,@CurrentUser UserInfo currentUser){
|
||||
sessionManager.terminate(
|
||||
currentUser.getSessionId(),
|
||||
|
||||
Reference in New Issue
Block a user