generated from rzdata/template
init
This commit is contained in:
parent
009830f7bd
commit
842fb7786a
@ -15,7 +15,10 @@
|
||||
*/
|
||||
package sample.web;
|
||||
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
||||
/**
|
||||
@ -30,4 +33,10 @@ public class LoginController {
|
||||
return "login";
|
||||
}
|
||||
|
||||
@GetMapping("/")
|
||||
public String index(HttpServletRequest request, Model model) {
|
||||
model.addAttribute("authentication", SecurityContextHolder.getContext().getAuthentication());
|
||||
return "index";
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user