I have two classes User.java and Address.java and there is a one-to-one bi-directional mapping between them. But when I try to get the address using the User class I get an “java.lang.StackOverflowError: null” exception. The same thing happens when I try to get the User from the Address class. Use…
Tag: spring-boot
Spring R2DBC Repos auto configuration not resolving dependencies
I Have the following repository: https://github.com/vlio20/bfit in which I try to use R2DBC in order to do db operations in an async manner. I followed the following tutorial (but maybe it is outdated https://www.youtube.com/watch?v=DvO4zLVDkMs Here are the relevant dependancies of my pom: I am using the defa…
Java Spring Boot consuming API with nested object returns NULL
I’m playing around with spring boot trying to consume a third parties rest api. The API call I’m using returns the below JSON object. My code successfully consumes this JSON object however it returns this. Note that rates={BTC=’null’} should be rates={BTC=’39049.424242′}. A…
Swagger is not working in Spring boot framework [closed]
Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 12 months ago. Improve this question It …
Parameter 0 of constructor in my class required a bean of my second class that could not be found
I know it’s a problem that is been posted 100 times, but unfortunately I am getting a Defining Bean error in my Spring Boot Application and I really do not know why. I do not see my error from launch to finish since I am defining a bean. I would appreciate any help. I’m sure it’s a stupid mi…
How to run consumer @StreamListener only after ApplicationReadyEvent method completed?
I have a consumer method with And I have a method with an event listener Is it possible to configure @StreamListener to start listening only after @EventListener method is completed? Answer According to Spring Cloud Stream docs you could use property spring.cloud.stream.bindings.<bindingName>.consumer.a…
Problem sending the type date with Angular
When I add the date to Spring from Angular, Spring save the day before instead the date that I insert. When I tried on postman everything works so the problem is when Angular send the data. My code on Spring model is: in my controller: In my component.html: I really can’t figure out why, thanks a lot wh…
CORS errors using Spring Boot, Spring Security and React
Good morning. I have been fighting with this issue for the past two days so I decided to post a question about it. Basically I have a Spring Boot project which executes basic CRUD operations through a React JS front-end. Everything seemed to work fine until I added Spring Security to the project. Since then w…
Importing OpenTelemetry trace data from Spring Boot application to Elastic APM – views are missing data
I have a Spring Boot application with Spring Cloud Sleuth, OpenTelemetry instrumentation and OpenTelemetry exporter OTLP. This is a gist of dependencies: spring-cloud-starter-sleuth without Brave, because we are using OpenTelemetry instrumentation spring-cloud-sleuth-otel-autoconfigure which introduces OpenTe…
JpaRepository with custom Query and Composite Primary Key: error unknown column
I have a SQL Server entity with a Composite Primary Key. That is the Entity: and this is ID Class: That is the JpaRepository But when this Query is executed I get an error: Invalid Column name: plz Answer Finally I got the solution 🙂 The select wasn’t returing the full key / object. Validation on the ob…