@Controller
public class EmployeeController
{
@Autowired
EmployeeService employeeService;
/**
* 編輯修改查詢員工信息
* id變量來源於地址 @PathVariable("id")
* @param id
* @return
*/
@RequestMapping(value = "/emp/{id}",method = RequestMethod.GET)
@ResponseBody
public Msg getEmp(@PathVariable("id") Integer id){
Employee employee = employeeService.getEmp(id);
return Msg.success().add("emp",employee);
}