Skip to content
Advertisement

Tag: quarkus

How to return a custom response for validation errors using Hibernate Validator and Quarkus

I implemented a REST endpoint in my Quarkus application. For validation purpose I’m using the hibernate-validator. So I added the @Valid annotation to the incoming parameter and added some constraints to that class. Everythings works as expected. When sending a request with invalid data I see a response like this: But I would like to have a more compact response

How to increase Parse Limit from 15000 in Graphql Using Quarkus

I am using an Angular application with Graphql to communicate with a Java/Quarkus backend. There is a situation where a large object is generated and I am attempting to manipulate it in the backend. An error occurs: Invalid Syntax : More than 15000 parse tokens have been presented. To prevent Denial Of Service attacks, parsing has been cancelled. Smallrye-graphql and

How to set a list as an Enum constant argument?

How do I pass a List type value in the constant parameter? In this case, this parameter is only for the PARS() constant. Update: I ended up not mentioning it in the post but it’s a list of object and not a string. Answer Enums are objects instantiated from a class, like other objects and classes. So if you have

Docker ENV LD_PRELOAD prevent container crash but throw java.io.IOException: Cannot run program “ls”: error=2, No such file or directory

I have a problem while call com.google.firebase.cloud.FirestoreClient.getFirestore() in a Java Application inside a Quarkus Server which is Running on an Alpine 3.15.4 inside a Docker container. I have created a small demo. The results are: Configuration 1 Enable in the docker file Results: init ok shell fail Configuration2 Disable in the docker file Results: init fail shell ok If init

ContainerRequestFilter being ignored in my Quarkus extension

I want to implement a custom extension to be used in my services. One of the key features is to filter all the incoming requests: And it’s being declared in that way: I also tried adding the Jandex plugin in the runtime pom But it’s not being called. I saw a similar scenario here but the solution doesn’t work for

Quarkus extension filter doesn’t work when registers via AdditionalBeanBuildItem

I want to implement my custom filter in my application. TemplateOverrideFilter I provide the configuration for the filter using ContextConfiguration And when I register my bean using the registerConfiguration method, it works well. But when I use registerAdditionalBeans, it doesn’t work. So I want to make the use of AdditionalBeanBuildItem also working. Can you help me? Answer So, I figured

Advertisement