Category "spring-boot"

Override a property for a single Spring Boot test

Consider the following example: @RunWith(SpringRunner.class) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, properties = {

Running into an error after upgrading springboot from 2.3.9 to 2.6.3

After upgrading from springboot 2.3.9 to 2.6.6 I have a failing tests with the following error, java.lang.AssertionError: Expecting: <Unstarted application

Spring Boot: exit jvm on "Application run failed"

Is there a way to react on "Application run failed", e.g. in case when database is unavailable? In my case the desired behavior is to exit the JVM process, so

Jlanguage does not implement the requested interface java.util.function.Supplier

CODE: Same code with out Microservice(Run as main class) giving correct output but after making it @service class(converting into microservice), it fails. I sti

how to fetch single attribute from redis cache spring boot?

how to fetch a single attribute from Redis cache spring boot? I want a response like this one { "answer": "FHFHFHFHFH" } but getting

generate auto increment id (int) in java for multi instance application

I have a table which stores users information(id, name, surname, address, email, etc). I don't want to use auto-increment function of the database. So, we don't

ElasticSearch - Spring Boot - Upsert is throwing DocumentMissingException

I am using Spring Boot and ElasticSearch. When I am trying to upsert using Spring, it is throwing DocumentMissingException when there is no document present in

spring boot - springdoc open api: No api definiation provided error

I need to document my spring boot application's rest apis with SpringDoc OpenApi. So, I added this dependency in my pom.xml: <dependency> <groupId&

Read entire File to String Spring Boot [duplicate]

I have a text file with path as resources/templates/temp.txt. I tried reading it with built in Files.readAllBytes() function found in java.nio

Should I use FFMPEG library vs CLI

In terms of performance, what is better to use, an FFMPEG library(like https://github.com/kokorin/Jaffree) or the FFMPEG command line interface?

SOAP Proxy with Spring Integration

I'm trying to wrap my head around spring integration and would preferably like to stay away from XML-based configuration. What I would like to do is the follo

Create dropdown dynamically on select

I have a Many-to-Many-Relationship between FishingDay and Fisherman. Here is my Entity-Class FishingDay: @Entity @Table(name = "FISHING_DAY") public class Fishi

Which version of spring doc open ui gradle plugin be used with spring-boot 2.6?

Which version of spring doc open ui gradle plugin be used with spring-boot 2.6 ? I see this is the last plugin id "org.springdoc.openapi-gradle-plugin" version

Swagger declaration schema = @Schema(implementation = Map.class) represents Schema as String in swagger-ui

I am trying to create springdoc swagger documentation, and I would like to represent a request body having data type Map<String, Object> in a better reada

how disable liquibase in jhipster 7.7.0

I'd like to know how can I temporarily disable Liquibase in JHipster 7.7.0 there is a similar question here I tried this suggested solution but it shows this er

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