Skip to content

Commit

Permalink
Remove the @Blocking annotation from ProductsResource (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
njlbenn authored Jun 15, 2024
1 parent dba58c4 commit d9c5037
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import io.quarkus.qute.Template;
import io.quarkus.qute.TemplateInstance;
import io.smallrye.common.annotation.Blocking;

import jakarta.inject.Inject;
import jakarta.ws.rs.GET;
Expand All @@ -20,14 +19,12 @@ public class ProductsResource {
Template details;

@GET
@Blocking
public TemplateInstance products() {
return catalogue.data("products", Product.listAll());
}

@GET
@Path("{productId}")
@Blocking
public TemplateInstance details(@PathParam("productId") Long productId) {
Product product = Product.findById(productId);
if(product != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import io.quarkus.qute.Template;
import io.quarkus.qute.TemplateInstance;
import io.smallrye.common.annotation.Blocking;

import jakarta.inject.Inject;
import jakarta.ws.rs.GET;
Expand All @@ -20,14 +19,12 @@ public class ProductsResource {
Template details;

@GET
@Blocking
public TemplateInstance products() {
return catalogue.data("products", Product.listAll());
}

@GET
@Path("{productId}")
@Blocking
public TemplateInstance details(@PathParam("productId") Long productId) {
Product product = Product.findById(productId);
if(product != null) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.lunatech.training.quarkus;

import io.smallrye.common.annotation.Blocking;

import jakarta.ws.rs.*;
import jakarta.ws.rs.core.MediaType;
import java.util.List;
Expand All @@ -11,14 +9,12 @@
public class ProductsResource {

@GET
@Blocking
public List<Product> products() {
return Product.listAll();
}

@GET
@Path("{productId}")
@Blocking
public Product details(@PathParam("productId") Long productId) {
Product product = Product.findById(productId);
if (product != null) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.lunatech.training.quarkus;

import io.smallrye.common.annotation.Blocking;

import jakarta.ws.rs.*;
import jakarta.ws.rs.core.MediaType;
import java.util.List;
Expand All @@ -11,14 +9,12 @@
public class ProductsResource {

@GET
@Blocking
public List<Product> products() {
return Product.listAll();
}

@GET
@Path("{productId}")
@Blocking
public Product details(@PathParam("productId") Long productId) {
Product product = Product.findById(productId);
if (product != null) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.lunatech.training.quarkus;

import io.smallrye.common.annotation.Blocking;

import jakarta.ws.rs.*;
import jakarta.ws.rs.core.MediaType;
import java.util.List;
Expand All @@ -11,14 +9,12 @@
public class ProductsResource {

@GET
@Blocking
public List<Product> products() {
return Product.listAll();
}

@GET
@Path("{productId}")
@Blocking
public Product details(@PathParam("productId") Long productId) {
Product product = Product.findById(productId);
if (product != null) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.lunatech.training.quarkus;

import io.smallrye.common.annotation.Blocking;

import jakarta.transaction.Transactional;
import jakarta.validation.Valid;
import jakarta.ws.rs.*;
Expand All @@ -14,14 +12,12 @@
public class ProductsResource {

@GET
@Blocking
public List<Product> products() {
return Product.listAll();
}

@GET
@Path("{productId}")
@Blocking
public Product details(@PathParam("productId") Long productId) {
Product product = Product.findById(productId);
if (product != null) {
Expand Down

0 comments on commit d9c5037

Please sign in to comment.