edit form example
This commit is contained in:
parent
221ecbdae6
commit
fe7b8bf4ba
@ -1,17 +1,13 @@
|
||||
package org.baeldung.security;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/")
|
||||
public class HomeController {
|
||||
|
||||
@GetMapping
|
||||
@RequestMapping
|
||||
public String home() {
|
||||
return "home";
|
||||
}
|
||||
|
@ -25,9 +25,10 @@
|
||||
<sec:authorize access="hasRole('ADMIN')">
|
||||
Manage Users
|
||||
</sec:authorize>
|
||||
<form>
|
||||
<form method="post">
|
||||
<sec:csrfInput />
|
||||
Text Field: <br /> <input type="text" name="textField" />
|
||||
<input type="submit" value="Submit form with CSRF input">
|
||||
</form>
|
||||
<sec:authorize url="/userManagement">
|
||||
<a href="/userManagement">Manage Users</a>
|
||||
|
Loading…
x
Reference in New Issue
Block a user