Category "spring"

com.fasterxml.jackson.databind.exc.InvalidDefinitionException for some REST operations on User entity

I have a few entities: User, Role, Privilege. And for all three entities, I have three operations which are then exposed as REST api. findOne(), findAll(), and

Getting error: 'Access-Control-Allow-Origin' header contains multiple values '*, *', but only one is allowed

I tried to make a connection between my Angular frontend and a REST Endpoint in Java / Spring (which I didn't developed and don't know so well). By GET, all wor

Can't jUnit test with file from resources folder

I'm trying to unit test with a file located under src/test/resources, but I can't always get a nullpointer when I'm trying to read it. I'm using Spring Boot 2.

How to Integrate Open API 3 with Spring project (not Spring Boot) using springdoc-openapi

My Existing Project is on Spring Framework not Spring Boot. I want to integrate Open API 3 with it. I want to integrate using springdoc-openapi not using Jers

Spring Boot JMS MappingJackson2MessageConverter cannot find `_type` field even though it exists

I'm using Spring boot to receive JMS message and cURL to send it. Here's the Spring config: @Bean public MessageConverter jsonJmsMessageConverter() { Mapp

Spring data: DeleteAll and Insert in same transaction

I am trying to achieve below native query logic using hibernate (Spring JPA). But save(Iterable) throws exception and rollback the entire transaction if one of

UML diagram (Class Diagram) of whole Spring project in STS

I have developed a REST API's Project and I want to draw a class diagram for every API individually. I have downloaded the eclipse plugin of PlantUML but this d

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 connect a Python websocket client to my Spring endpoint?

I'm new to Python and I'm trying to connect to a service that I currently have up running in Spring. On the server-side I have a custom Handshake handler in pla

Spring MVC + thymeleaf: How to allow empty input?

How can I allow empty input to field with type long in Spring MVC + thymeleaf? I want this field to take default value. Currently I have the error: Field

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

MappingException (Hibernate)

"Could not get constructor for org.hibernate.persister.entity.SingleTableEntityPersister " I am not using any maven or such tools and manually add and reference

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

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

Getting "Not permitted" as a cause while creating a listener for TIBCO JMS Topic

While setting up a JMS listener for a TIBCO topic using Spring, I am getting the below error as our TIBCO won't allow any other subscribers. So, I am looking fo