Ignore:
Timestamp:
07/07/23 12:14:58 (16 months ago)
Author:
HristijanMitic00 <hristijan.mitic.01@…>
Branches:
main
Parents:
1dd9226
Message:

First commit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/project/fmo/app/projcetfmo/Web/LogoutController.java

    r1dd9226 rd14176d  
    1 package project.fmo.app.projcetfmo.Web;public class LogoutController {
     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    }
    218}
Note: See TracChangeset for help on using the changeset viewer.