-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d03638a
commit c2cd83b
Showing
3 changed files
with
38 additions
and
6 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
infrastructure/src/main/java/br/com/ifsp/tickets/infra/config/app/ProductConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package br.com.ifsp.tickets.infra.config.app; | ||
|
||
import br.com.ifsp.tickets.app.financial.product.ProductService; | ||
import br.com.ifsp.tickets.app.financial.product.ProductServiceFactory; | ||
import br.com.ifsp.tickets.domain.administrative.event.IEventGateway; | ||
import br.com.ifsp.tickets.domain.financial.product.ITicketSaleGateway; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
@Configuration | ||
@RequiredArgsConstructor(onConstructor_ = @__(@Autowired)) | ||
public class ProductConfig { | ||
|
||
private final IEventGateway eventGateway; | ||
private final ITicketSaleGateway ticketSaleGateway; | ||
|
||
@Bean | ||
public ProductService productService() { | ||
return ProductServiceFactory.create( | ||
eventGateway, | ||
ticketSaleGateway | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters