create resources

This commit is contained in:
Valentin CZERYBA 2022-05-30 22:41:12 +02:00
parent 9ef8bb92ff
commit 3a5d89c5fb
2 changed files with 27 additions and 0 deletions

View File

@ -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>

View 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"));
}
}