Maven does qol by handling dependencies and managing the build process.
Maven fetches a library for you given an XML for it
pom file contains details of all dependencies, language version etc.
@RestController denotes a class as handling rest requests
@GetMapping, @PutMapping etc. have "/path" variables that are counted from the base address. Can have multiple path combinations that run the same method
@RequestBody = the whole body as a string param
@PathVariable value = "val" String val: Generates a string variable from a path variable
@RequestParam(value = "val") String val: Query param in url
@RequestHeader(value = "val" String val): pass name val pair in in header(s)
@XMapping(value = "/", Consumes = x) consumes = accepts, produces = sends out. content-type is header to set the matching value in the request
@RequestParam is also used for http in body
required goes in @PVariable(val = "x", required = false)
hierarchies/categories: path params
random filters: query params
body params are useful in posts
for some data about a post/put object (eg. category), might need to be passed with path params
For delete, use path anf query to find and specify the one
HttpClient cli = HttpClient.newHttpClient(); - sets up a new client for coms with the server
HttpRequest req = HttpRequest.newBuilder().uri(new URI(url)).GET().BUILD(); - constructs request, setting URI, then type, then build command