source: src/main/java/com/example/baza/web/LogoutController.java@ bc39b15

Last change on this file since bc39b15 was ed20c2c, checked in by HumaSejdini <humasejdini12@…>, 2 years ago

Initial commit

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