I watched a tutorial that explains how to integrate RabbitMQ into Spring Boot app. In the tutorial, the ReceiveMessageHandler.java (Consumer) and SendMessageController.java (Producer) classes were in the same project. I want to implement them in two different Spring Boot application. However I can’t spl…
Tag: spring
Dependency injection with @Inject and Interface in Quarkus
I’m trying to resolve dependency injection with Repository Pattern using Quarkus 1.6.1.Final and OpenJDK 11. I want to achieve Inject with Interface and give them some argument(like @Named or @Qualifier ) for specify the concrete class, but currently I’ve got UnsatisfiedResolutionException and not…
Spring Batch @BeforeContext Fails to Execute
I have a situation in spring batch where I have multiple item processors that make up a composite item processor. I need to share some context data between two processors in the same step. I have found a working solution to access the context, shown below. That said there is an alternate solution that appears…
change the json object value
I have a json object like above and i want to change apiInvokerPublicKey’s value i did not find a method in gson so how can i change it? EDIT: I used addProperty method from gson but it changes whole “onboardingInformation” i just want to change “apiInvokerPublicKey” Answer You c…
Custom validation with javax.validation
I’m trying to make a custom java validation annotation and returns me Request processing failed; nested exception is javax.validation.ConstraintDeclarationException: HV000144: Cross parameter …
Making a Spring Boot Configuration Fault Tolerant [closed]
I have a Spring Boot Application that relies on various services like Keycloak, Elastic Stack, and PostgreSQL. This application will be deployed to an Kubernetes cluster along with a number of other …
JPA many to many relationship causing infinite recursion
Edit: I solved the problem using @JsonIgnoreProperties in both classes I have two entities in my api. Pokemon which has a list of “types” that pokemon have and Type which has a list of “pokemon” that have that specific type. I’m trying to implement a getAll method in my controlle…
Spring SPEL collection projection
A simple question on SPEL collection selection. Look at section 10.5.17 Collection Selection on this page https://docs.spring.io/spring/docs/4.3.10.RELEASE/spring-framework-reference/html/expressions.html What i need is the selection ‘Serbian’ to come from outside and not be a fixed hard coded Str…
No mapping for request with mockmvc
Currently struggling with problem when I get ‘mapping error for request’ with following controller/test configuration. Controller: Test: Configuration: After test execution I get No mapping for POST /subscriber/session The reason for the struggle is that my code from other modules with the same co…
Uploading mp4 from Android phone to Spring server results in file missing a few hundred bytes if bigger than 2MB
I have been trying to upload to a Java Spring server running on my laptop, using an app written in Xamarin forms, using a physical Redmi Android device. But when I send out the multi-part request, if it is bigger than about 2MB, the file loses a few hundred bytes by the time it reaches the server. For example…