Last change
on this file was d3cf3a1, checked in by Marija Micevska <marija_micevska@…>, 2 years ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
479 bytes
|
Rev | Line | |
---|
[d3cf3a1] | 1 | package project.educatum.web;
|
---|
| 2 |
|
---|
| 3 | import org.springframework.stereotype.Controller;
|
---|
| 4 | import org.springframework.web.bind.annotation.GetMapping;
|
---|
| 5 | import org.springframework.web.bind.annotation.RequestMapping;
|
---|
| 6 |
|
---|
| 7 | import javax.servlet.http.HttpServletRequest;
|
---|
| 8 |
|
---|
| 9 | @Controller
|
---|
| 10 | @RequestMapping("/logout")
|
---|
| 11 | public class LogoutController {
|
---|
| 12 |
|
---|
| 13 | @GetMapping
|
---|
| 14 | public String logout(HttpServletRequest request) {
|
---|
| 15 | request.getSession().invalidate();
|
---|
| 16 | return "redirect:/login";
|
---|
| 17 | }
|
---|
| 18 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.