@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);
}