redis work in progress
This commit is contained in:
parent
824d75dfcd
commit
180d25cfcb
4
pom.xml
4
pom.xml
@ -76,6 +76,10 @@
|
||||
<groupId>io.quarkus</groupId>
|
||||
<artifactId>quarkus-resteasy-qute</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.quarkus</groupId>
|
||||
<artifactId>quarkus-redis-client</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.quarkus</groupId>
|
||||
<artifactId>quarkus-junit5</artifactId>
|
||||
|
@ -1,8 +1,7 @@
|
||||
package com.covas.Resources;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.CompletionStage;
|
||||
import java.util.concurrent.Flow;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.ws.rs.GET;
|
||||
@ -13,8 +12,7 @@ import javax.ws.rs.core.Response;
|
||||
import com.covas.Entity.UsersEntity;
|
||||
|
||||
import io.quarkus.mailer.MailTemplate;
|
||||
import io.quarkus.qute.CheckedTemplate;
|
||||
import io.smallrye.mutiny.Uni;
|
||||
import io.quarkus.redis.client.RedisClient;
|
||||
|
||||
@Path("mail")
|
||||
public class MailRessource {
|
||||
@ -22,8 +20,9 @@ public class MailRessource {
|
||||
@Inject
|
||||
private MailTemplate mailer;
|
||||
|
||||
@Inject
|
||||
RedisClient redisClient;
|
||||
|
||||
|
||||
|
||||
@GET
|
||||
public Response sendMail(UsersEntity users){
|
||||
@ -43,5 +42,18 @@ public class MailRessource {
|
||||
return Response.ok().build();
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("set-redis")
|
||||
public Response setRedis(){
|
||||
redisClient.set(Arrays.asList("toto","sss"));
|
||||
return Response.ok().build();
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("get-redis/{id}")
|
||||
public Response getRedis(@PathParam("id") String id){
|
||||
return Response.ok().entity(redisClient.get(id)).build();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -20,4 +20,9 @@ quarkus.mailer.port=587
|
||||
quarkus.mailer.start-tls=REQUIRED
|
||||
quarkus.mailer.username=valczebackup@gmail.com
|
||||
quarkus.mailer.password=aohrpmqvxldwyebs
|
||||
quarkus.mailer.mock=false
|
||||
quarkus.mailer.mock=false
|
||||
|
||||
|
||||
|
||||
quarkus.redis.hosts=redis://localhost:6379
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user