@GetMapping("/employees/{id}")
	public EntityModel<Employee> findOne(@PathVariable Integer id) {

		Class<EmployeeController> controllerClass = EmployeeController.class;

		// Start the affordance with the "self" link, i.e. this method.
		Link findOneLink = linkTo(methodOn(controllerClass).findOne(id)).withSelfRel(); // <1>

		// Return the affordance + a link back to the entire collection resource.
		return new EntityModel<>(EMPLOYEES.get(id), //
				findOneLink //
						.andAffordance(afford(methodOn(controllerClass).updateEmployee(null, id))) // <2>
						.andAffordance(afford(methodOn(controllerClass).partiallyUpdateEmployee(null, id)))); // <3>
	}
@ GetMapping ( "/employees/{id}" ) public EntityModel < Employee > findOne ( @ PathVariable Integer id ) { Class < EmployeeController > controllerClass = EmployeeController . class ; Link findOneLink = linkTo ( methodOn ( controllerClass ) . findOne ( id ) ) . withSelfRel ( ) ; return new EntityModel < > ( EMPLOYEES . get ( id ) , findOneLink . andAffordance ( afford ( methodOn ( controllerClass ) . updateEmployee ( null , id ) ) ) . andAffordance ( afford ( methodOn ( controllerClass ) . partiallyUpdateEmployee ( null , id ) ) ) ) ; }
tag::get[]