diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2023-09-06 13:51:43 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2023-09-06 13:53:17 +0200 |
commit | 37dce40a77b888bc8f676c2d0eb4bff93b6fb22c (patch) | |
tree | 46e199235135b0a5214758c9d7a7911b67f9b944 | |
parent | a3ecc51397ad9da6c028db7fa532cbfcd18d21e2 (diff) |
Change from RESTEasy Classic to RESTEasy Reactive.
Change-Id: I3a3386c3a3a380b8217ac1667cc623625aeee532
8 files changed, 17 insertions, 7 deletions
@@ -174,19 +174,15 @@ </dependency> <dependency> <groupId>io.quarkus</groupId> - <artifactId>quarkus-resteasy</artifactId> + <artifactId>quarkus-resteasy-reactive</artifactId> </dependency> <dependency> <groupId>io.quarkus</groupId> - <artifactId>quarkus-resteasy-jsonb</artifactId> + <artifactId>quarkus-resteasy-reactive-jsonb</artifactId> </dependency> <dependency> <groupId>io.quarkus</groupId> - <artifactId>quarkus-resteasy-mutiny</artifactId> - </dependency> - <dependency> - <groupId>io.quarkus</groupId> - <artifactId>quarkus-resteasy-qute</artifactId> + <artifactId>quarkus-resteasy-reactive-qute</artifactId> </dependency> <dependency> <groupId>io.quarkus</groupId> diff --git a/src/main/java/eu/mulk/mulkcms2/benki/bookmarks/BookmarkResource.java b/src/main/java/eu/mulk/mulkcms2/benki/bookmarks/BookmarkResource.java index 4d08298..40f7166 100644 --- a/src/main/java/eu/mulk/mulkcms2/benki/bookmarks/BookmarkResource.java +++ b/src/main/java/eu/mulk/mulkcms2/benki/bookmarks/BookmarkResource.java @@ -12,6 +12,7 @@ import eu.mulk.mulkcms2.benki.posts.PostResource; import io.quarkus.qute.CheckedTemplate; import io.quarkus.qute.TemplateInstance; import io.quarkus.security.Authenticated; +import io.smallrye.common.annotation.Blocking; import jakarta.json.JsonObject; import jakarta.transaction.Transactional; import jakarta.validation.constraints.NotEmpty; @@ -38,6 +39,7 @@ import javax.annotation.CheckForNull; import org.jsoup.Jsoup; @Path("/bookmarks") +@Blocking public class BookmarkResource extends PostResource { @CheckedTemplate(basePath = "benki/bookmarks") diff --git a/src/main/java/eu/mulk/mulkcms2/benki/lazychat/LazychatResource.java b/src/main/java/eu/mulk/mulkcms2/benki/lazychat/LazychatResource.java index e93f7de..45c7f4d 100644 --- a/src/main/java/eu/mulk/mulkcms2/benki/lazychat/LazychatResource.java +++ b/src/main/java/eu/mulk/mulkcms2/benki/lazychat/LazychatResource.java @@ -8,6 +8,7 @@ import eu.mulk.mulkcms2.benki.posts.Post; import eu.mulk.mulkcms2.benki.posts.PostFilter; import eu.mulk.mulkcms2.benki.posts.PostResource; import io.quarkus.security.Authenticated; +import io.smallrye.common.annotation.Blocking; import jakarta.transaction.Transactional; import jakarta.validation.constraints.NotNull; import jakarta.ws.rs.Consumes; @@ -26,6 +27,7 @@ import java.time.OffsetDateTime; import java.util.Objects; @Path("/lazychat") +@Blocking public class LazychatResource extends PostResource { public LazychatResource() throws NoSuchAlgorithmException { diff --git a/src/main/java/eu/mulk/mulkcms2/benki/login/LoginResource.java b/src/main/java/eu/mulk/mulkcms2/benki/login/LoginResource.java index d51e77c..17139eb 100644 --- a/src/main/java/eu/mulk/mulkcms2/benki/login/LoginResource.java +++ b/src/main/java/eu/mulk/mulkcms2/benki/login/LoginResource.java @@ -1,6 +1,7 @@ package eu.mulk.mulkcms2.benki.login; import io.quarkus.security.Authenticated; +import io.smallrye.common.annotation.Blocking; import jakarta.ws.rs.DefaultValue; import jakarta.ws.rs.GET; import jakarta.ws.rs.HeaderParam; @@ -10,6 +11,7 @@ import java.net.URI; import java.net.URISyntaxException; @Path("/login") +@Blocking public class LoginResource { @GET diff --git a/src/main/java/eu/mulk/mulkcms2/benki/newsletter/NewsletterResource.java b/src/main/java/eu/mulk/mulkcms2/benki/newsletter/NewsletterResource.java index cceddb1..5e8614f 100644 --- a/src/main/java/eu/mulk/mulkcms2/benki/newsletter/NewsletterResource.java +++ b/src/main/java/eu/mulk/mulkcms2/benki/newsletter/NewsletterResource.java @@ -5,6 +5,7 @@ import static jakarta.ws.rs.core.MediaType.TEXT_HTML; import io.quarkus.mailer.MailTemplate.MailTemplateInstance; import io.quarkus.qute.CheckedTemplate; import io.quarkus.qute.TemplateInstance; +import io.smallrye.common.annotation.Blocking; import jakarta.transaction.Transactional; import jakarta.ws.rs.FormParam; import jakarta.ws.rs.GET; @@ -17,6 +18,7 @@ import java.util.concurrent.CompletionStage; @Path("/newsletter") @Produces(TEXT_HTML) +@Blocking public class NewsletterResource { @CheckedTemplate diff --git a/src/main/java/eu/mulk/mulkcms2/benki/posts/AllPostsResource.java b/src/main/java/eu/mulk/mulkcms2/benki/posts/AllPostsResource.java index b934408..ebcbfcd 100644 --- a/src/main/java/eu/mulk/mulkcms2/benki/posts/AllPostsResource.java +++ b/src/main/java/eu/mulk/mulkcms2/benki/posts/AllPostsResource.java @@ -1,9 +1,11 @@ package eu.mulk.mulkcms2.benki.posts; +import io.smallrye.common.annotation.Blocking; import jakarta.ws.rs.Path; import java.security.NoSuchAlgorithmException; @Path("/posts") +@Blocking public class AllPostsResource extends PostResource { public AllPostsResource() throws NoSuchAlgorithmException { diff --git a/src/main/java/eu/mulk/mulkcms2/benki/posts/PostResource.java b/src/main/java/eu/mulk/mulkcms2/benki/posts/PostResource.java index 0be31d7..c8090ba 100644 --- a/src/main/java/eu/mulk/mulkcms2/benki/posts/PostResource.java +++ b/src/main/java/eu/mulk/mulkcms2/benki/posts/PostResource.java @@ -25,6 +25,7 @@ import io.quarkus.mailer.MailTemplate.MailTemplateInstance; import io.quarkus.qute.CheckedTemplate; import io.quarkus.qute.TemplateInstance; import io.quarkus.security.identity.SecurityIdentity; +import io.smallrye.common.annotation.Blocking; import io.smallrye.mutiny.Uni; import jakarta.annotation.Nullable; import jakarta.inject.Inject; @@ -72,6 +73,7 @@ import org.eclipse.microprofile.config.inject.ConfigProperty; import org.hibernate.Session; import org.jsoup.Jsoup; +@Blocking public abstract class PostResource { private static final String hashcashDigestAlgorithm = "SHA-256"; diff --git a/src/main/java/eu/mulk/mulkcms2/benki/wiki/WikiResource.java b/src/main/java/eu/mulk/mulkcms2/benki/wiki/WikiResource.java index 1ca77ca..42f7c63 100644 --- a/src/main/java/eu/mulk/mulkcms2/benki/wiki/WikiResource.java +++ b/src/main/java/eu/mulk/mulkcms2/benki/wiki/WikiResource.java @@ -9,6 +9,7 @@ import io.quarkus.qute.CheckedTemplate; import io.quarkus.qute.TemplateInstance; import io.quarkus.security.Authenticated; import io.quarkus.security.identity.SecurityIdentity; +import io.smallrye.common.annotation.Blocking; import jakarta.inject.Inject; import jakarta.json.JsonObject; import jakarta.json.spi.JsonProvider; @@ -32,6 +33,7 @@ import org.jsoup.Jsoup; import org.jsoup.safety.Safelist; @Path("/wiki") +@Blocking public class WikiResource { private static final JsonProvider jsonProvider = JsonProvider.provider(); |