Last change
on this file was f7c05a1, checked in by Elena Shulevska <elena.shulevska@…>, 15 months ago |
initial commit of the source code on origin
|
-
Property mode
set to
100644
|
File size:
520 bytes
|
Line | |
---|
1 | package com.example.villadihovo.web.controller.ControllersForHome;
|
---|
2 |
|
---|
3 | import jakarta.servlet.http.HttpServletRequest;
|
---|
4 | import org.springframework.stereotype.Controller;
|
---|
5 | import org.springframework.web.bind.annotation.GetMapping;
|
---|
6 | import org.springframework.web.bind.annotation.RequestMapping;
|
---|
7 |
|
---|
8 | @Controller
|
---|
9 | @RequestMapping("/logout")
|
---|
10 | public class LogoutController {
|
---|
11 |
|
---|
12 | @GetMapping
|
---|
13 | public String logout(HttpServletRequest request){
|
---|
14 | request.getSession().invalidate();
|
---|
15 | return "redirect:/api/login";
|
---|
16 | }
|
---|
17 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.