move /user to separate RequestController
This commit is contained in:
parent
fd27729072
commit
26b64b8ab4
|
@ -88,4 +88,4 @@ local.properties
|
||||||
*.launch
|
*.launch
|
||||||
|
|
||||||
# SQLite
|
# SQLite
|
||||||
prototype/src/main/resources/*.db
|
prototype/*.db
|
||||||
|
|
|
@ -95,32 +95,6 @@ public class RequestController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/user/")
|
|
||||||
public String user() {
|
|
||||||
return "redirect:/user/settings";
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/user/settings")
|
|
||||||
public String userSettings() {
|
|
||||||
return "user/settings";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@GetMapping("/user/orders/")
|
|
||||||
public String userOrdeers() {
|
|
||||||
return "user/orders/index";
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/user/bonuspoints")
|
|
||||||
public String userBonuspoints() {
|
|
||||||
return "user/bonuspoints";
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/user/notifications/")
|
|
||||||
public String userNotifications() {
|
|
||||||
return "user/notifications/index";
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/about")
|
@GetMapping("/about")
|
||||||
public String about() {
|
public String about() {
|
||||||
return "about";
|
return "about";
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
package org.hso.ecommerce.app;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("user")
|
||||||
|
public class UserRequestController {
|
||||||
|
|
||||||
|
@GetMapping("/")
|
||||||
|
public String user() {
|
||||||
|
return "redirect:/user/settings";
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/settings")
|
||||||
|
public String userSettings() {
|
||||||
|
return "user/settings";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("/orders/")
|
||||||
|
public String userOrdeers() { return "user/orders/index"; }
|
||||||
|
|
||||||
|
@GetMapping("/bonuspoints")
|
||||||
|
public String userBonuspoints() {
|
||||||
|
return "user/bonuspoints";
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/notifications/")
|
||||||
|
public String userNotifications() {
|
||||||
|
return "user/notifications/index";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Reference in New Issue