Guest User

Untitled

a guest
Aug 17th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. Can converted @PathVariables reference each other?
  2. @RequestMapping("/admin/{dept}/{mod}/")
  3. public String showModule(@PathVariable String dept, @PathVariable String mod) {
  4. Department department = dao.findDepartment(dept);
  5. Module module = department.findModule(mod);
  6. return "view";
  7. }
  8.  
  9. @RequestMapping("/admin/{dept}/")
  10. public String showDept(@PathVariable Department dept) {
  11. return "view";
  12. }
  13.  
  14. @RequestMapping("/admin/{deptAndModule}/")
  15. public String showDept(@PathVariable DepartmentAndModule deptAndModule) {
  16. return "view";
  17. }
Add Comment
Please, Sign In to add comment