Category "spring"

Spring boot - adding a secondary data source causes nothing to get save during a integration test

In a project I am working on we added a secondary data source. This meant adding the entity factory and the transaction manager at the @EnableJpaRepositories. W

Trying to create dynamic ES Index facing java.lang.ClassNotFoundException: org.springframework.data.spel.ExpressionDependencies

Using <spring-boot.version>2.3.9.RELEASE</spring-boot.version> added following dependencies : <dependency> <groupId>org.springframew

Spring-batch flow / split after a step

I am building a spring-batch solution that contains the following process: step 1 : split a list into multiple lists step 2 : process each sub-list step 3 :

In java spring, how to best "change secret in production"?

I am currently creating a Java Spring application that works with the spring security JWT. Everywhere I look and read about the "secret string", it says should

How is the best way to extract a section from word document with Apache poi?

I´m using Apache poi (XWPF) with Springboot in java 11. I need to extract the section number 2 (title and content) from a word document with the follow nu

I'm trying to write tis code in spring boot way, how to write prepared statement in spring

I'm trying to write tis code in spring boot way, how to write prepared statement in spring public static TechInfo getTechInfo(final Connection ttdb, fi

Polymorphic list elements in Spring configuration?

Is there an easy way to have polymorphic list elements in a configuration? E.g. for the following application.yaml: Vehicles: one: type: Bicycle id: 4

Spring State Machine use StateMachineTestPlan to test a withChoice transition

If I have a StateMachine set up as below: transitionConfigurer .withExternal() .source(FIRST) .event(EVENT_1) .target(SECOND) .and() .withChoic

Issue with Spring batch metadata tables

I created the spring batch metadata tables using the following link in my own oracle database https://github.com/spring-projects/spring-batch/tree/main/spring-b

Thymeleaf + spring save new object instead of update

I am asking for a hint. I searched the internet for a long time for a solution to the problem, but I'm already desperate. I would like the update operation to u

Java Spring Reactive, returning one Mono<..> from many multiple requests

[Java, Spring Reactive, MongoDB] I'm currently trying to learn Reactive programming by doing and I found a challenge. I have db object CategoryDB which looks li

Spring boot mapsId

Hi I using spring boot jpa and I need to use mapsid. There are not so much information about that and I wonder if anyone can help me understand how to use maybe

What is the best practice for solving the number of cases of N searches in Spring JPA?

What is the best practice for solving the number of cases of N searches? There are 3 search conditions for me. There are search conditions of A, B, and C. In th

Spring framework validate response data

I have custom simple endpoint that returns some object (record in my case). I would like to validate correctness of returned output data (i.e., output DTO does

return Mono.error inside Map Spring Webflux

For Matching condition, return Mono.error from code , but gives compilation error. I commented out //return Mono.error(new RuntimeException("User Phone Exists a

spring boot dynamic scheduling with cron expression defined by the user

I want to send messages on different dates so I'm going to use java scheduler and dynamic cron expression but the problem is that user can send multiple messag

Hibernate + spring multi tenancy wrong schema selected

I’m using Jhipster (Gradle + React) for one of my project, and recently, I want to add Multi-tenancy support to the whole application (tenant will be the

Kafka Consumer - Point to specific offset in Spring boot Kafka

I'm trying to seek the offset to some specific offset. It seems I need to use seekToTimestamp and there is no seekToOffset or something. I've research a lot but

How to use limit and skip in spring data mongodb repository?

I want query sublist in mongo collections using Spring Data MongoDB. My Code is like public interface SomeRepo extends MongoRepository<SomeDoc, String> {

Spring OAuth2 name always null

New to OAuth2 and Spring framework. Have followed two introduction guides to it so far (for example this one) and the OAuth2User object (org.springframework.sec