Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in function getdepDepartmentManagersByEmpDep #6

Closed
YingcaiDong opened this issue Oct 10, 2017 · 1 comment
Closed

Bug in function getdepDepartmentManagersByEmpDep #6

YingcaiDong opened this issue Oct 10, 2017 · 1 comment

Comments

@YingcaiDong
Copy link
Owner

GET /department_manager/find/dept_{dept_no}emp{emp_no}
function "getdepDepartmentManagersByEmpDep"
Input:
http://localhost:8080/department_manager/find/dept_d008_emp_111400
Output:
Empty

Should return:
{
"deptMangrKey": {
"department": {
"deptNo": "d008",
"deptName": "Research"
},
"employee": {
"birth_date": "1959-11-09",
"first_name": "Arie",
"last_name": "Staelin",
"gender": "M",
"hire_date": "1985-01-01",
"emp_no": 111400
}
},
"fromDate": "1985-01-01",
"toDate": "1991-04-08"
}

@YingcaiDong
Copy link
Owner Author

It turns out the problem was in the controller.
screen shot 2017-10-11 at 11 46 25 pm
Only one @PathVariable can be placed within the same path (between two slashes). As you can see in the picture above, I put two PathVariable in the same path, which resulting this request not respond.

To fix this problem is dead simple, I replaced the @PathVariable with @RequestParam
screen shot 2017-10-12 at 12 24 03 am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant