Fix pdf viewer when opening in docker.
Have envs for angular.
This commit is contained in:
@@ -102,7 +102,7 @@ public class BooksService {
|
||||
BookEntity bookEntity = bookRepository.findById(bookId).orElseThrow(() -> ApiError.BOOK_NOT_FOUND.createException(bookId));
|
||||
byte[] pdfBytes = Files.readAllBytes(new File(FileUtils.getBookFullPath(bookEntity)).toPath());
|
||||
return ResponseEntity.ok()
|
||||
.header(HttpHeaders.CONTENT_TYPE, "application/pdf")
|
||||
.header(HttpHeaders.CONTENT_TYPE, "text/plain")
|
||||
.body(pdfBytes);
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ spring:
|
||||
name: booklore-api
|
||||
datasource:
|
||||
driver-class-name: org.h2.Driver
|
||||
url: jdbc:h2:~/my-library-temp/config/db/booklore
|
||||
url: jdbc:h2:~/my-library-temp/config/local/db/booklore
|
||||
username: sa
|
||||
password: password
|
||||
jpa:
|
||||
|
||||
Reference in New Issue
Block a user