-
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.
Implement new email service RESEND (#476)
* Implement @slf4j for logging * Change some logging type from warn to info * Disable logging file * Implement new email service RESEND * Fix tests * Fix integration tests * Add body message in the lista de productos email * Fix test
- Loading branch information
1 parent
454dfbb
commit 615863a
Showing
18 changed files
with
443 additions
and
546 deletions.
There are no files selected for viewing
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
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,24 @@ | ||
package sic.service.impl; | ||
|
||
import org.springframework.stereotype.Component; | ||
import sic.exception.ServiceException; | ||
import sic.service.IEmailService; | ||
import java.util.Map; | ||
|
||
@Component | ||
public class EmailServiceFactory { | ||
|
||
private final Map<String, IEmailService> emailServices; | ||
|
||
public EmailServiceFactory(Map<String, IEmailService> emailServices) { | ||
this.emailServices = emailServices; | ||
} | ||
|
||
public IEmailService getEmailService(String emailServiceProvider) { | ||
var emailService = emailServices.get(emailServiceProvider); | ||
if (emailService == null) { | ||
throw new ServiceException("Proveedor de email no soportado!"); | ||
} | ||
return emailService; | ||
} | ||
} |
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
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
Oops, something went wrong.