I've a RestController for a CRUD annotated like this:
@RestController
@RequestMapping("/rest/v1/area")
public class AreaController
My methods are annotated like:
@RequestMapping(value = "/{uuid}", method = RequestMethod.PUT)
public ResponseEntity<Area> save(@Valid @RequestBody Area area) {
Is there a way to use a value for a method to have an absolute path? I want to add a method to upload files, and don't want to make a new Controller just for this. I want a method like:
@RequestMapping(value = "/rest/v1/area-upload", method = RequestMethod.PUT
public String handleFileUpload(@RequestParam("file") MultipartFile file, RedirectAttributes redirectAttributes) {
Thanks!