Spring Example
- Spring uses a lot of annotations to define behavior
- Uses Reflection, proxies, and all sorts of magic to make your code work
- You shouldn't need to know the internals to work with Spring
@RestController
public class HelloWorldRestController {
@GetMapping("/hello/{name}")
public HelloResponse sayHello(@PathVariable(value = "name") String name) {
return new HelloResponse("Ryan", 28, true);
}
}
20 / 21