Category "spring"

Spring Repository query by multi-valued property

Trying to solve a problem where I have a class Student. public class Student { @Id UUID id; String name; Long year; List<Attribute> at

Rest API response as XML format, calling from Spring Boot with Resttemplate

I have created Rest API using Spring Boot & Data JPA. It's working fine if requested from Postman responds as JSON format, but when I request from coding us

useAbstractionForFiles OpenAPI WebClient not working

I am using OpenAPI generator (Gradle plugin version 5.4.0) to generate a few API calls. One of said calls, revolves a file download from an external service i.e

How to register a ApplicationEnvironmentPreparedEvent in Spring Test

I have a @SpringBootTest and I need to notified via ApplicationEnvironmentPreparedEvent to create a database file if it not exists, because my application datab

Spring Cloud Contract with Wiremock - how to choose Scenario manually?

Im working in a project using Spring Cloud Contract and Wiremock to create integration tests. Everything was fine until we need to add multiple responses to the

Pass custom parameter to ConstraintValidator

I'm working on this springboot application where I need to do some validations on values passed from http call and I'm using class level validation as explained

Using Rate Limiting doesn't add Header to response and gets CORS error in client

I'm trying to adapt this tutorial to my server using the Bucket4j Spring Boot Starter. I'm using an application.properties file. I can limit the api queries wit

Hibernate produces broken query

I have an entity that is mapped to the database table by Hibernate: @Entity @NoArgsConstructor @Getter @Setter @FieldNameConstants public class Set extends Abs

package org.springframework.beans.factory does not exist error

I try to implement a simple hello world program using Spring framework. I have tried the following example in Windows environment without using IDE. In Eclipse

Creating a configurable JUnit library to test same features across several microservices

A set of tests should be run on every microservice. Current solution is to have an abstract class and extend in every service, providing the necessary propertie

Why Spring @Autowired doesn't work in abstract class?

I am doing this way in abstract class @Autowired lateinit var fileContract: FileContract with error kotlin.UninitializedPropertyAccessException: lateinit prop

Custom message for Type Mismatch validation error while using Spring Boot and Hibernate Validator

Controller public String dummyAction(@Valid @ModelAttribute DummyInputData inputData) { return "success"; } Entity public class DummyInputData {

Can we implement a Java library by using Java Frameworks like Guice or Spring?

I am creating a new java library and will make the package as a jar file and have another JAVA application that can use it in terms of a JAVA library. So, is it

How to override custom Jackson deserializer in child project?

In our company library (say lib-a) we have an interface: public interface MyInterface { ... } and its default implementation: public enum DefaultMyImpl imp

Optional fields in Java DTO with validation constraint

I've created a DTO with some properties with validation constraint (like all the properties must be present in JSON Object). Now, I want to make that DTO in a w

ElasticsearchException invalid missing tagline - Opensearch

Currently trying to start my app but unable because of this exception being thrown when starting app Caused by: org.springframework.data.elasticsearch.Uncategor

how to auto-refresh AWS STS Temporary security credentials when it expires while accessing Amazon SQS?

I've spring boot app with QueueMessagingTemplate as client to access Amazon SQS using temporary security credentials(STS). Getting temp token using STS-AssumeRo

Stream file from S3 without downloading locally

Is it possible stream a zip file through a Java (spring boot) service from Amazon S3 without having to actually download the whole file in the service? For cont

Multiple ProxyExchangeArgumentResolver Beans

I am working with spring-cloud-gateway and have the need to use multiple custom WebClients to proxy different requests. Having one custom WebClient is no proble

C++ parallel framework to .Net (with C#) or Spring (with Java)

First question on Stack Overflow, hopefully I won't get flamed. If .Net mainly uses C#, and Spring mainly uses Java, what framework is most popular with C++ for