I was working on an example of how to get Liquibase with SpringBoot and multiple databases working. After some documentation and reading stackoverflow, here it is, for a future reference: https://github.com/divukman/liquibase_spring_boot_example
Month: September 2022
Spring REST – returning image or a file
Just an example of how to return an image or a file from a rest controller. Idea can be to proxy image call or just to return a file. @GetMapping(value="/scans/{id}/{image}", produces = MediaType.IMAGE_JPEG_VALUE) public ResponseEntity<?> getScanImage(@PathVariable String id, @PathVariable String image) { final byte[] imageBytes = bucketApi.readScan(UUID.fromString(id), image); return new ResponseEntity<>(imageBytes, HttpStatus.OK); } @GetMapping(value="/scans/stream/{id}/{image}", produces … Continue reading Spring REST – returning image or a file