Add Spring Boot Hello World guide
Add Spring Boot Hello World Guide Fixes gh-3866
This commit is contained in:
+1
-1
@@ -44,7 +44,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
|
||||
auth
|
||||
.inMemoryAuthentication()
|
||||
.withUser("user1").password("password1").roles("USER");
|
||||
.withUser("user").password("password").roles("USER");
|
||||
}
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
@@ -9,4 +9,4 @@ logging:
|
||||
|
||||
spring:
|
||||
thymeleaf:
|
||||
cache: true
|
||||
cache: false
|
||||
|
||||
@@ -10,9 +10,8 @@
|
||||
Logged in user: <span sec:authentication="name"></span> |
|
||||
Roles: <span sec:authentication="principal.authorities"></span>
|
||||
<div>
|
||||
<form action="/logout" method="post">
|
||||
<form action="#" th:action="@{/logout}" method="post">
|
||||
<input type="submit" value="Logout" />
|
||||
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -22,4 +21,4 @@
|
||||
<li>Go to the <a href="/user/index" th:href="@{/user/index}">secured pages</a></li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<h1>Login page</h1>
|
||||
<p>Example user: user1 / password1</p>
|
||||
<p>Example user: user / password</p>
|
||||
<p th:if="${loginError}" class="error">Wrong user or password</p>
|
||||
<form th:action="@{/login}" method="post">
|
||||
<label for="username">Username</label>:
|
||||
|
||||
Reference in New Issue
Block a user