Last change
on this file since b3f2adb was b3f2adb, checked in by Aleksandar Siljanoski <acewow3@…>, 14 months ago |
Adding project to repo
|
-
Property mode
set to
100644
|
File size:
492 bytes
|
Line | |
---|
1 | package com.example.eatys_app.controller;
|
---|
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:/login";
|
---|
16 | }
|
---|
17 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.