source: src/main/java/project/fmo/app/projcetfmo/Web/LogoutController.java

main
Last change on this file was d14176d, checked in by HristijanMitic00 <hristijan.mitic.01@…>, 12 months ago

First commit

  • Property mode set to 100644
File size: 484 bytes
Line 
1package project.fmo.app.projcetfmo.Web;
2
3import org.springframework.stereotype.Controller;
4import org.springframework.web.bind.annotation.GetMapping;
5import org.springframework.web.bind.annotation.RequestMapping;
6
7import javax.servlet.http.HttpServletRequest;
8
9@Controller
10@RequestMapping("/logout")
11public class LogoutController {
12
13 @GetMapping
14 public String logout(HttpServletRequest request) {
15 request.getSession().invalidate();
16 return "redirect:/";
17 }
18}
Note: See TracBrowser for help on using the repository browser.