@RestController @RequestMapping(value="api") public class EmailResource extends Object
| Modifier and Type | Field and Description |
|---|---|
(package private) MessagingService |
messagingService |
| Constructor and Description |
|---|
EmailResource() |
| Modifier and Type | Method and Description |
|---|---|
void |
freemarker(String subject,
String template,
Object context,
String to) |
void |
simple(String subject,
String content,
String to) |
void |
thymeleaf(String subject,
String template,
Object context,
String to) |
@Autowired MessagingService messagingService
@RequestMapping(value="email/simple",
method=POST)
@ResponseStatus(value=CREATED)
public void simple(@RequestParam(value="subject")
String subject,
@RequestBody
String content,
@RequestParam(value="to")
String to)
throws MessagingException
MessagingException@RequestMapping(value="email/thymeleaf",
method=POST)
@ResponseStatus(value=CREATED)
public void thymeleaf(@RequestParam(value="subject")
String subject,
@RequestParam(value="template")
String template,
@RequestBody
Object context,
@RequestParam(value="to")
String to)
throws MessagingException
MessagingException@RequestMapping(value="email/freemarker",
method=POST)
@ResponseStatus(value=CREATED)
public void freemarker(@RequestParam(value="subject")
String subject,
@RequestParam(value="template")
String template,
@RequestBody
Object context,
@RequestParam(value="to")
String to)
throws MessagingException
MessagingExceptionCopyright © 2021. All rights reserved.