Implement notification mechanism
This commit is contained in:
+1
@@ -69,6 +69,7 @@ public class LibraryProcessingService {
|
||||
if (bookDTO != null) {
|
||||
BookNotification notification = BookNotification.builder().action(BOOK_ADDED).addedBook(bookDTO).build();
|
||||
notificationService.sendMessage("/topic/books", notification);
|
||||
notificationService.sendMessage("/topic/logs", "Book added: " + bookDTO.getFileName());
|
||||
log.info("Processed file: {}", libraryFile.getFilePath());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ spring:
|
||||
hibernate:
|
||||
naming:
|
||||
physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
|
||||
show-sql: true
|
||||
show-sql: false
|
||||
properties:
|
||||
hibernate:
|
||||
jdbc:
|
||||
|
||||
Reference in New Issue
Block a user