Relative Content

Tag Archive for javaspringspring-boothibernate

Getting 500 Exception response on my entity Booking due to @Future Annotation

I am building a web application based on hotel room booking and testing my REST API through postman and this @Future annotation from import jakarta.validation.constraints.Future; is giving me 500 response, while I tried to hit the link mentioned in the screenshot,I tried again by removing this @Future annotation and it is working perfectly, so please tell me if there is any alternative (for validating future checkOutDate should be greater than checkInDate) or solution for this issue.

Unable to make Spring boot work with AttributeConverter

My application using Spring Boot 3.3.2 connects to multiple instances of the same DB structure, as each DB is owned by differente clients. Said dabatases have names in spanish, but our application is developed completely in english. I tried to create a AttributeConverter so I can transform one of the fields, that represents a status as ACTIVE or INACTIVE instead of ACTIVO and INACTIVO.

dao.FindAll().size assertion started to fail after migrating to Spring Boot 3.0

I am migrating Spring Boot application from version 2.7 to version 3.0. After modifications made in pom.xml, big part of my unit tests in Groovy classes started to fail. In some cases, there were issues with application context, and in the other ones – assertion errors. I managed to fix most of them except two UTs, when there is an assertion checking the size of orders collection:

dao.FindAll().size assertion started to fail after migrating to Spring Boot 3.0

I am migrating Spring Boot application from version 2.7 to version 3.0. After modifications made in pom.xml, big part of my unit tests in Groovy classes started to fail. In some cases, there were issues with application context, and in the other ones – assertion errors. I managed to fix most of them except two UTs, when there is an assertion checking the size of orders collection: