You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@maciejwalkowiak I really enjoyed the Video but where u able to fully test it? Note I like the concepts provided and agree in most of them but checking DomainEventListener located under application or Catalog module fails modulith verification with the Loan Events from Lending module:
Module 'catalog' depends on non-exposed type library.lending.domain.LoanCreated within module 'lending'!
LoanCreated declares parameter LoanCreated.handle(LoanCreated) in (DomainEventListener.java:0)
Note I logged modules to see further details and I saw no expose, I checked modules dependecies and saw:
Lending
Logical name: lending
Base package: library.lending
Direct module dependencies: none
Spring beans:
o ….application.RentBookUseCase
o ….application.ReturnBookUseCase
o ….domain.LoanRepository
Catalog
Logical name: catalog
Base package: library.catalog
Direct module dependencies: none
Spring beans:
o ….application.AddBookToCatalogUseCase
o ….application.DomainEventListener
o ….application.RegisterBookCopyUseCase
o ….domain.BookRepository
o ….domain.CopyRepository
o ….infrastructure.OpenLibraryBookSearchService
So how can we see LoanCreated and Closed (from Lending Module) in the the Catalog module / application : DomainEventListener if Modulith verification fails because they aren't exposed?
The text was updated successfully, but these errors were encountered:
paguerre3
changed the title
DomainEventListener located under application or Catalog module fails modulith verification with the LoanClass from Lending module
DomainEventListener located under application or Catalog module fails modulith verification with LoanCreated and Closed from Lending module
Aug 20, 2024
@maciejwalkowiak
As a Quick solution I added @NamedInterface in the classes exposed into the Catalog module from Lending module, e.g.:
import org.springframework.modulith.NamedInterface;
@NamedInterface
public record LoanClosed(CopyId copyId) {
}
@maciejwalkowiak ***Please add me as a collaborator and I can commit the solution if u like or explain a better solution because now i see DO Events from domain of Lending exposed to the aplication Layer of Catalog ***
Result:
Logical name: lending
Base package: library.lending
Named interfaces:
@maciejwalkowiak I really enjoyed the Video but where u able to fully test it? Note I like the concepts provided and agree in most of them but checking DomainEventListener located under application or Catalog module fails modulith verification with the Loan Events from Lending module:
LoanCreated declares parameter LoanCreated.handle(LoanCreated) in (DomainEventListener.java:0)
Note I logged modules to see further details and I saw no expose, I checked modules dependecies and saw:
Lending
Catalog
So how can we see LoanCreated and Closed (from Lending Module) in the the Catalog module / application : DomainEventListener if Modulith verification fails because they aren't exposed?
The text was updated successfully, but these errors were encountered: