Implement notification mechanism

This commit is contained in:
aditya.chandel
2024-12-27 00:09:19 -07:00
parent e08cd4e8d3
commit ea716bfb69
10 changed files with 129 additions and 70 deletions
@@ -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: