Skip to content
This repository was archived by the owner on Dec 12, 2018. It is now read-only.

Commit 14ab5f7

Browse files
author
Kyle Anderson
committed
Fixed Conflicting Endpoint in Spring Boot Tutorials
1 parent 92b88b1 commit 14ab5f7

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

tutorials/spring-boot/04-a-finer-grain-of-control/src/main/java/com/stormpath/tutorial/controller/HelloController.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ String home(HttpServletRequest req, Model model) {
4545
return "home";
4646
}
4747

48-
@RequestMapping("/me")
49-
String me() {
50-
return "me";
48+
@RequestMapping("/userdetails")
49+
String userDetails() {
50+
return "userdetails";
5151
}
5252

5353
@RequestMapping("/restricted")

tutorials/spring-boot/04-a-finer-grain-of-control/src/main/resources/templates/home.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<h1 th:inline="text">Hello, [[${account.givenName}]]!</h1>
3636
<form th:action="@{/logout}" method="post">
3737
<a href="/restricted" class="btn btn-primary">Restricted</a>
38-
<a href="/me" class="btn btn-warning">My Groups</a>
38+
<a href="/userdetails" class="btn btn-warning">My Groups</a>
3939
<input type="submit" class="btn btn-danger" value="Logout"/>
4040
</form>
4141
</div>

tutorials/spring-boot/05-token-management/src/main/java/com/stormpath/tutorial/controller/MeController.java renamed to tutorials/spring-boot/05-token-management/src/main/java/com/stormpath/tutorial/controller/UserDetailsController.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
* @since 1.0.RC8.3
2929
*/
3030
@RestController
31-
public class MeController {
31+
public class UserDetailsController {
3232

33-
@RequestMapping(value="/me", produces = MediaType.APPLICATION_JSON_VALUE)
33+
@RequestMapping(value="/userdetails", produces = MediaType.APPLICATION_JSON_VALUE)
3434
public AccountInfo info(HttpServletRequest req) {
3535
// must be logged in to get here per Spring Security config
3636
Account account = AccountResolver.INSTANCE.getAccount(req);

0 commit comments

Comments
 (0)