Category "spring-boot"

How to write a query using multiple 'IN' or any other keywords in SQL so that the condition being applied will be based upon the order defined

I want to fetch records from the database as : select * from table where column1 IN (aa, bb , cc...) and column2 IN (34, 55, 66...) and column3 IN(df, fg, hh...

Gitlab CI/CD Spring boot Mysql sample Build and db connection successful but Junit test failing with Unknown database issue..! (DB exist)

Applying CI/CD With Spring Boot MySQL Gitlab I'm created very basic Spring boot crud application with MySQL, What I need to implement is Gitlab CI pipeline to a

Jdeps Module java.annotation not found

I'm trying to create a minimal jre for Spring Boot microservices using jdeps and jlink, but I'm getting the following error when I get to the using jdeps part E

I can't update my webapp to Spring Boot 2.6.0 (2.5.7 works but 2.6.0 doesn't)

As mentioned in the title I can't update my webapp to Spring Boot 2.6.0. I wrote my webapp using Spring Boot 2.5.5 and everything works perfectly. If I update t

Spring Boot Resource Server & Keycloak scope vs. role

is there anybody out there who is using Spring Boot Resource Server & Keycloak? I configured my application.properties withspring.security.oauth2.resourcese

Mockito mockStatic cannot resolve symbol

I'm using Spring Boot and in a unit test, I'm trying to mock the Files.delete(myFile.toPath()) method. To do so I'm trying to use the Mockito.mockStatic() metho

While building the project getting error , Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.10.4:jar (attach-javadocs)

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.

Can one Kafka Producer Class have multiple @EventListener methods?

Im using Spring Kafka and wrote Producer Class @Component @RequiredArgsConstructor class Producer { private static final String TOPIC = "channels"; pri

Can one Kafka Producer Class have multiple @EventListener methods?

Im using Spring Kafka and wrote Producer Class @Component @RequiredArgsConstructor class Producer { private static final String TOPIC = "channels"; pri

mapper does not convert between dto to entity

I am new to mapsturct I just want to map between dto to entity those two; my bank class; @Id private int id; my bank dto class; private Integer bankId; my m

How to set a variable for Controller from HttpInterceptor? [closed]

I am building a Spring Boot application. I like to set a variable for the Spring Boot application. This variable should be set in an HTTP inte

How to get an object of current user in Spring Boot+JPA

I need to create shopping cart. I have a model CartItem: @Entity @Table(name = "cart_items") public class CartItem { @Id @GeneratedValue(strategy = Generation

What is the difference between spring-boot:build-image vs jib?

Spring Boot 2.3.x adds the capability of building a Docker image using their plugin via spring-boot:build-image. Jib seems to allow the same functionality but

Strict @MockBean in a Spring Boot Test

I am developing a Spring Boot application. For my regular service class unit tests, I am able to extend my test class with MockitoExtension, and the mocks are s

Post request with content type application/x-www-form-urlencoded not working in Spring

I'm using OpenAPI generator to generate Spring REST APIs. Here is a fragment: openapi: 3.0.2 info: version: 1.0.0 title: Auth paths: '/auth/v1/token':

Spring jar can't see resources

I have Spring Boot web app which work on IntelliJ. I build jar file from maven. Jar starts but css, js and img "blocked" in Chrome console show error 404, Firef

Spring JPA not returning Foreign keys in response

I have a database with some entities, ( in parent child relationship )I can say and when When I try to make a query to child table to get all the rows, I only g

java.lang.NoSuchMethodError: com.mongodb.client.MongoCollection.insertOne exception when inserting entry to Javers Mongodb collection

I am able to insert the data to mongodb collection. Same time Javers framework trying to insert the data to jv_snapshots collection. Data insertion to jv_snapsh

Failed to get correlation key for `citrus_message_correlator_HttpClient`

I have a CitrusEndpoints server configuration @Bean public HttpServer myService() { return CitrusEndpoints. http(). server().

Spring Boot now displaying the index.jsp page

I am a newbie with Spring boot. I am trying to return my index page in the controller but I am not able to. Its just returning the word index in the output. Her