Category "spring-boot"

Cascade Flux results

I have two actions in Mono, both returning similar object - Mono action1() Mono action2() I tried doing - Flux1.blockFirst(); Flux2.blockFirst(); both of the fl

how to run docker container with external application properties file?

How to run docker containers with external application properties files? & how to add properties file into the docker volume ? how to mount the volume with

Kafka consumer unit test with Avro Schema registry failing

I'm writing a consumer which listens to a Kafka topic and consumes message whenever message is available. I've tested the logic/code by running Kafka locally an

Retryrequest() of httpClient method not invoked during Rest API call

The Rest API responds with 429 error code and the retry has to trigger 3 times .But the control isn't reaching the retryrequestethod of HttpRequestretryHandler

Spring WebClient aggregates multiple 401 UNAUTHORIZED error to throw Exceptions.CompositeException

When WebClient calls an external api (with different query params) asynchronously with a wrong token, the first few returns with 401 UNAUTHORIZED and the contro

My custom validation annotation is not working in Spring Boot

i have created an annotation that has features such as checking if the entered string is null or at the assigned value.But the annotation doesn't work. I don't

Hibernate JPA error when inherited form other class

I am trying to have a abstract common class for all my entity. Here is my Entity class and abstract class:- @Entity @MappedSuperclass @Table(name="TBL_EMPLOYEE

java 8 stream for double loop and change the value in first loop

i have nested loop to loop and change the first list based on condition below. this works fine. its like if cardNumber in firstList same or found in secondList,

java 8 stream for double loop and change the value in first loop

i have nested loop to loop and change the first list based on condition below. this works fine. its like if cardNumber in firstList same or found in secondList,

JPA Inheritance with JOINED strategy

I've seen many posts about inheritance but nothing match my problem. I try to build a correct objects model: The root class @Entity @Inheritance(strategy = I

AssertionFailure: null identifier when try to save identifying one-to-one relation

I'm trying to make identifying relation with Spring Data JPA. And following is my (simplified) entities. @Entity class AuthorizationCodeEntity( @MapsId

Spring Boot - Hibernate - Table does not exists

I have a 3rd party jar that holds all the entities and mapping. I am currently using this jar successfully in a classic Spring-MVC application, but now I am t

Authenticate certain endpoints with custom Filter | Spring Security [duplicate]

1. Overview First things first - I am pretty new to Spring Security so if you see something trivial, please keep that in mind 🤓 I am t

Query for a cache hit rate graph with prometheus

I'm using Caffeine cache with Spring Boot application. All metrics are enabled, so I have them on Prometheus and Grafana. Based on cache_gets_total metric I w

spring batch+spring boot+java config+test cases

spring batch+spring boot+java config+test cases I have followed the below example and my use case matches this, I have implemented the project with similar set

Spring Security Rejects Fetch OPTIONS Preflight Outright If content-type = 'application/json'

If a Fetch POST to a Spring Security (v 5.6.1) enabled service endpoint sends this header: headers.append("Content-Type", "application/json"); the OPTIONS pref

has been blocked by CORS policy: Response to preflight request doesn't pass

I have created one app using angular and springboot for basic authentication with spring security but i am getting 401 error ..i am novice in springboot @Confi

Named parameter not bound : DATE_FORMAT Native Query in Spring Boot

I am trying to get table data as list using select query between dateFrom and current date using MySQL Native Query in Spring Boot. and MySQL database field dat

HikariPool-1 - Exception during pool initialization

I'm deploying Spring-Boot4 project and I have got an error called HikariPool-1 - Exception during pool initialization. 2019-07-05 11:29:43.600 INFO 5084 --- [

Single unexpected null value in a request while testing a rest controller with soapUI

I have a Controller which receives a request object via SoapUI (screen below). What confuses me it is that only one of the 2 attributes of this request object i