Category "spring"

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

How do I properly catch and handle PoolInitializationException in Spring Boot Application?

I'm writing a Spring Boot 2.6.3 app with a HikariDataSource created programmatically (so I can control names, timeouts, etc.). The interface method is used by a

415 Unsupported Media Type from POST

I need to create a POST call with Spring/Webclient which does work fine with curl. POSTDATA="{\"subject\":\"CN=test\",\"type\": \"ssh\",\"usage\":\"login\",\"va

How to disable angular detection for assets folder

Am developing an angular application with spring boot as a back end, i wanted to make an upload to a local stockage in my PC. I made a Stockage folder in the as

Why @JsonInclude(JsonInclude.Include.NON_EMPTY) is not working?

I am trying to set null values to database of empty values from JSON payload. This problem caused beacause I have unique constraints on social entity fields. I

Send a path containing slashes in Kotlin Spring mappings

Having trouble dealing with slashes in controller mappings in Kotlin Spring. My client application sends an absolute path ("C:/User/Documents/FolderX"), and sho

Error creating bean with name 'entityManagerFactory - nested exception is java.lang.NullPointerException

I'm only learning Java and Spring and after several projects/tutorials went well I'm stuck with this error on a new project: org.springframework.beans.factory.

Spring Boot always redirects to login page

I have a problem about spring boot. I'm beginner and need to help. I'm created a project via initializr. And my pom xml; <?xml version="1.0" encoding="UTF-8"

Mongo template left join between two queries

In a spring project, I'm using reactive mongodb with mongo template to return a result of type Report class. var res1 = (Flux<Report>) template.find(q

Spring Webflux - Database connection metrics

Small question regarding database connection metrics for Spring Webflux (2.6+) web application please. For the SpringBoot (non Webflux) apps, connecting to JDBC