This is how we faced the challenge of creating a notification email services
- Take-home Microservices Challenge
- Table of contents
- Overview
- Screenshot
- Links
- Built with
- How I did it
- Continued development
- Author
- Acknowledgments
The design is structured as shown:
- src|
- main
- java|
- com/xxx/challenge/notificationEmailService|
- config
- dto
- consumer
- service
- test
- com/xxx/challenge/notificationEmailService|
- Service Socket: [AMQChannel(amqp://guest@127.0.0.1:5672/,1),]
package com.xxxx.challenge.notificationEmailService.service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.mail.SimpleMailMessage;
import org.springframework.mail.javamail.JavaMailSender;
import org.springframework.stereotype.Service;
@Service
public class MessageNotificationEmailService {
@Autowired
private JavaMailSender mailSender;
public void sendNewMail(String to, String subject, String body) {
SimpleMailMessage message = new SimpleMailMessage();
message.setTo(to);
message.setSubject(subject);
message.setText(body);
mailSender.send(message);
}
}
- maybe
- [https://angular.io] Build user interfaces out of individual pieces called components!.
- Website - [https://ferreiras.dev.br]