create resources
This commit is contained in:
parent
9ef8bb92ff
commit
3a5d89c5fb
4
pom.xml
4
pom.xml
@ -64,6 +64,10 @@
|
||||
<groupId>io.quarkus</groupId>
|
||||
<artifactId>quarkus-smallrye-openapi</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.quarkus</groupId>
|
||||
<artifactId>quarkus-mailer</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.quarkus</groupId>
|
||||
<artifactId>quarkus-junit5</artifactId>
|
||||
|
23
src/main/java/com/covas/Resources/MailRessource.java
Normal file
23
src/main/java/com/covas/Resources/MailRessource.java
Normal file
@ -0,0 +1,23 @@
|
||||
package com.covas.Resources;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.Path;
|
||||
|
||||
import io.quarkus.mailer.Mail;
|
||||
import io.quarkus.mailer.reactive.ReactiveMailer;
|
||||
import io.smallrye.mutiny.Uni;
|
||||
|
||||
@Path("mail")
|
||||
public class MailRessource {
|
||||
|
||||
@Inject
|
||||
private ReactiveMailer mail;
|
||||
|
||||
@GET
|
||||
public Uni<Void> sendMail(){
|
||||
return mail.send(Mail.withText("valcze80@gmail.com", "toto", "toto"));
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user