Spring Example

  • Spring uses Java Reflection to figure out how to call your methods
  • Also uses Reflection to figure out how to structure the HTTP response
@RestController
public class EmployeeDB {
    @GetMapping("/employees/{employeeId}")
    public Person fetchEmployee(@PathVariable Integer employeeId) { 
        /* ... */
    }
}

12 / 31