150,301 questions
Score of 1
1 answer
46 views
can't find org.springframework.kafka.core.reactive.ReactiveKafkaConsumerTemplate
I'm building a springboot kafka app. While building a kafka consumer, I can't import org.springframework.kafka.core.reactive.ReactiveKafkaConsumerTemplate because this class can't be found.
I have ...
Score of 1
1 answer
60 views
Where can I find all the dependencies specified by Spring Boot's bill of materials?
Spring Boot provides a Maven bill of materials (BOM), that specifies the recommended versions of various Spring Boot dependencies. Some of these dependencies are Spring Boot starters such as org....
Score of 0
4 answers
93 views
JUnit Test cases failing after upgrading to Gradle 9, Springboot 4 and Java 25
After upgrading all the junit test cases which have dependency on spring-web are failing. Dependency analyzer shows that this artifact is not in the TestRuntimeClasspath scope and I am suspecting that ...
Score of 0
0 answers
69 views
Duplicate call of FilterChainProxy with SpringSecurity, MVC and StringResponseBody
I encounter a strange behaviour in my Spring-Boot project (v4.0.6):
When I execute a Controller which returns ResponseEntity<StraingResponseBody> for writing NDJSON-Lines the FilterChainProxy of ...
Score of 0
1 answer
189 views
How to configure RestClient timeout in Spring Boot 4?
Our existing Java Spring Boot 4 app injects a basic RestClient bean into several classes. The app does not make any other use of HTTP clients. Now I would like to configure the RestClient with some ...
Score of 1
1 answer
109 views
How does Spring Boot SecurityContextHolder works
I am quite struggling to understand how does even Spring
SecurityContextHolder
work internally I read too many articles but not able to understand it properly can anybody explain me how does it even ...
Score of 1
0 answers
114 views
Spring Boot cannot find table in Docker database
I have created multiple Spring Boot apps with a database in Docker and it's never been a problem. I can run tests, and run the app and everything works fine. But, I created a new app in IntelliJ ...
Score of 0
0 answers
51 views
SpringBoot init fails with jasypt password configured as env variable
Don't know why, bug pumped out all of a sudden.
Spingboot couldn't boot with code like below.
@Component("jasyptStringEncryptor")
class Sm4Encryptor(@param:Value($$"${jasypt.encryptor....
Score of 3
2 answers
119 views
Does @Order on a @Configuration class determine SecurityFilterChain precedence in Spring Security?
I'm trying to understand how Spring Security determines the order of multiple SecurityFilterChain beans.
The official documentation demonstrates applying @Order directly to the SecurityFilterChain ...
Score of 0
1 answer
103 views
Update join query in Spring Boot
I receive sensors' values, I store the stats, last received and dump a new received list in a dedicated table, before comparing and updating.
Structure is, omitting superfluous:
SensorStats
@Id long ...
Score of 0
0 answers
52 views
Spring Data JPA throwing StaleObjectStateException / OptimisticLockException on consumer retry across separate instances (No @Version column)
I'm seeing an issue in a Kafka consumer running on multiple application instances.
Environment
Spring Boot: 3.5.15
Hibernate: 6.6
Oracle: 19c
My entity has no @Version column.
@Id @GeneratedValue(...
Score of 0
1 answer
106 views
Logback filtering is ignored when running "mvn clean install" for all tests, but works for an individual test in isolation
I have the following logback-test.xml (pointed to by application-test.yml) specifically for JUnit tests whereby any logging containing the substring TestException should be ignored:
<?xml version=&...
Score of -4
0 answers
99 views
Draft versions of entities in spring
For a CMS-like tool I would like to store changes coming in via API into a "draft" version of all effected entities to then build a release workflow where all or selected entites can be ...
Score of 0
0 answers
165 views
Best approach for full-file aggregation before processing 4M records — memory vs performance vs lock contention
Business Requirement
I need to process large CSV files (4M records) which contains ID and other contact info as batch job. The batch updates three SQL Server tables.Core constraint — cannot use line-...
Score of -1
0 answers
133 views
Is a hand-rolled CASE expression a reasonable way to do relevance-ranked search with JPA Criteria API + MySQL, or is there a better approach?
I'm building a company search endpoint in a Spring Boot app (JPA Criteria API, MySQL) where I want exact matches to appear before prefix matches and before substring matches when a user searches by ...