Category "spring-boot"

How to extract response header & status code from Spring 5 WebClient ClientResponse

I am new to Spring Reactive framework & trying to convert Springboot 1.5.x code into Springboot 2.0. I need to return response header after some filtering,

Could not find or load main class org.apache.maven.wrapper.MavenWrapperMain

I have a spring boot project here: https://github.com/jcasbin/jcasbin-springboot-plugin. I encountered the following error in Travis CI: shell 3.43s$ ./mvnw in

Error creating bean with name 'redisson' defined in class path resource in Spring boot

I am facing some issue while connecting Redis("Using Redisson") with spring boot. At aplication Start time show below error. "org.springframework.beans.factory

How can I disable HTTP TRACE in embedded untertow of a Spring boot application

My goal is to DISABLE HTTP TRACE method for my spring boot application, which is using embedded undertow. A working yaml change will be preferred, if not, cod

How to solve Spring swagger Ambiguous mapping?

In my spring controller class i have below two methods @GetMapping(value = "/published_messages", produces = MediaType.APPLICATION_JSON_VALUE) public Respo

error using mvn spring-boot:build-image - received unexpected HTTP status: 500 Server Error"

I tried using 'mvn spring-boot:build-image' command and get that error.. ( I saw that maven have a new way to create an image with spring) Building image 'doc

404 error with swagger-ui and spring webflux

I am developping REST services with Spring Webflux and I want to produce documentation with Swagger2 for my API with. I discovered that Webflux is only supporte

How to upgrade spring framework version in spring boot

I am using spring-boot 2.3.3.RELEASE with the according spring-boot-starter-parent in maven. <parent> <groupId>org.springframework.boot</group

Spring Data: can I create a method in the @Repository with a name what return list of object if String equals to constant?

Guess easier if I show you my example: @Entity class User { Long id; Status status; } enum Status { NEW("N"), DELETED("D") } I have an AttributeCon

Could not find Spring Profile when uses JUnit Runner in IDEA

I'm trying to run a JUnit Test in IntelliJ IDEA, but the Runner could not find the Spring Profile. this message is displayed in the log: --spring.profiles.acti

401 unauthorized page for swagger?

I am enable swagger2 by @EnableSwagger2. However, when I try to hit "/swagger-ui.html", it first hit my Authentication Filter. Then, I wrote the following code

Get JobParameters on RepositoryItemReader

I have a problem with the execution of the batch process that I am developing. It comprises several steps. The first one recovers data and inserts it into a ta

Custom parameter names with a bean for request parameters in Spring 5

I'm trying to use Spring 5 to have a custom bean for my request parameters. In theory this is easy, but I want to have the field names be different from the par

endpoint_failure (context canceled) resulting in duplicate call to REST Endpoint

Am invoking an REST endpoint from another service using restTemplate.exchange. The endpoint that receives the request invokes DB and fetches around 1.5 mil rec

pgp_sym_decrypt not working with JPA nativeQuery. Always throw error

Hi I'm working on a Spring Boot Project using PSQL. I have a model that is implemented pgcrypto like this, @ColumnTransformer( read = "pgp_sym_decrypt( ms

Cannot get Spring Boot to lazily resolve a multipart file

I have created a Spring Boot 2 demo application with the Spring Initializr and added the controller below: @Controller @RequestMapping("/demo") public class Upl

Caused by: java.lang.IllegalArgumentException: Value was not an array [java.util.ArrayList]

I am trying to save the List<byte[]> object in Postgres DB, but I am getting the below error. Caused by: java.lang.IllegalArgumentException: Value was not

How do I create a callback API in springboot framework?

The scenario goes something like this. I've a 3rd party system that accepts 'callback' endpoint and upon a specific event (at the 3rd party system), a new API r

Disabling auto commit in Spring boot not worked

I set two parameters to disable auto commit by False but save operation on entity without transaction was committed. spring.datasource.hikari.auto-commit=false

How to add "allowDiskUse" in @Aggregation annotation in repository in Spring Boot?

I have an aggregation written in a MyRepository.kt file which is being called from MongoDataRetriever.kt file in the backend. MyRepository.kt file: import org.s