I created a builder class which construct Specifications object. It is used for creating queries for JpaSpecificationExecutor. The builder is used, because I ha
I am writing integration tests for a spring-boot application, and I am using a base test class for common methods and all the other common stuff. Something like
I'm working on a problem where i have to do pagination of two data lists. ex. psudo code int recordsPerPage = 100; // this is dynamic int currentPage = 1; // th
Using spring reactive WebClient, I consume an API and in case of response with 500 status I need to retry with exponential backoff. But in Mono class, I don't s
I'm building a REST API with Spring Boot to retrieve boat information. I'm using Spring Data Rest and Spring Data JPA. When I get the data from the API, I don't
I have 2 models: Student and Teacher. Teacher has One-To-Many relation with Student, Student has Many-To-One with teacher. I want to build API what gonna have i
When creating tests and mocking dependencies, what is the difference between these three approaches? @MockBean: @MockBean MyService myservice; @Mock: @Mock
I use brand new spring boot project with next Maven dependency <dependency> <groupId>org.springframework.boot</groupId>
INFORMATION NEEDED: I use Keycloak (Docker version) behind a Spring project. (The client side of this project is React and communication between client and ba
We have two springboot servers. We use nginx so that the user request will be sent to one of the server node. Now we want to achieve that: After user inputs thr
While trying to use max function in thymeleaf I got OGNL expressionn everytime. I'm not even sure if we can use functions like max/min in thymeleaf. Tried to lo
Running my application on localhost with this url -> http://localhost:8081/my-service-name After configuring prometheus, I am getting the metrics on postman
I try following a video tutorial for Apache Camel education and trying aggregate queue objects in a next way: @Component public class AggregationRoute extends R
There is a Spring Rest Controller : @RestController @RequestMapping("secanalytique") public class SectionAnalytiqueController { @GetMapping(value = "/sect
I am consuming a REST Api with RestTemplate. The response I'm getting from the API has lots of nested objects. Here's a little snippet as an example: "formular
I am creating a Spring boot application with a thymeleaf front-end. I am trying to create an object of type "expense" (seen in the code snippet below) but, when
In my application I would want to send emails using javamail. I use Thymeleaf so that I can send some data. When sending the email, I want the background to be
I'm trying to make call to repository inside my Entity Listener, when I call repository.findById() method inside my @prePersist method the same method is callin
Using spring boot 2.6.2, with java17, trying to create native image but it fails with below error. I am building it on windows 11 machine with docker desktop i
I have an endpoint to get the image i uploaded earlier, it works but not well I don't know if i can get the image in response my controller endpoint: @PreAuth