Questions tagged [spring5]
94 questions
9
votes
3 answers
How to determine if Spring WebClient is using HTTP/2?
I would like to know whether Spring WebClient is using HTTP/2. How I can determine that?

pixel
- 24,905
- 36
- 149
- 251
8
votes
1 answer
Spring WebClient reactor.netty.internal.shaded.reactor.pool.PoolAcquireTimeoutException
I am using Spring WebClient to call a rest service. The code for the post call as mentioned below.
Mono response = client.post()
.uri(uriBuilder -> uriBuilder.build())
…

mnpr
- 325
- 4
- 8
4
votes
3 answers
Return the complete response using Spring WebClient
I have the following code
public ClientResponse doGet(HttpServletRequest request, URI uri) {
return webClient.get()
.uri(uri.toASCIIString())
.headers(headers -> headers.putAll(processRequest(request))
…

Philip John
- 5,275
- 10
- 43
- 68
4
votes
2 answers
disableRegistry() doesn't exist (org.apache.tomcat.util.modeler.Registry)
I updated my project from Spring Boot 1.5.6.RELEASE to 2.2.5.RELEASE and now I get an error claiming that the web server cannot be started because org.apache.tomcat.util.modeler.Registry.disableRegistry() cannot be found. This is a call made by…

Tihomir Mitkov
- 846
- 1
- 11
- 20
3
votes
3 answers
How to autowire a bean inside a Spring @Condition class
I have an interface IInterface.java like below:
public interface IInterface {
void printIt();
}
And there are two implementation classes for this: ImplementationA.java and ImplementationB.java
@Component
public class ImplementationA implements…

DockYard
- 989
- 2
- 12
- 29
3
votes
1 answer
How can I get the referrer URL in Spring Webflux?
How can I get the referrer URL in Spring Webflux?
I tried to look into the header attributes in ServerWebExchange exchange object but could not found the same.
Can someone please help me here.

Paras
- 3,191
- 6
- 41
- 77
2
votes
0 answers
Spring 4 -> Spring5 (events) migration problems with @Import Configuration class with constructor params
I'm trying migrate my spring 4 code to spring 5 (specifically latest -> 5.3.16), and most of it seems to be ok, but am having a
No default constructor found; nested exception is java.lang.NoSuchMethodException:…

MeBigFatGuy
- 28,272
- 7
- 61
- 66
2
votes
0 answers
Error creating bean with name 'mvcContentNegotiationManager' (Spring 5.3.8)
I am trying to migrate a Spring application from Spring 4.3.26 to Spring 5.3.8. So have setup my pom file. But when I deploy my war file, I get the below error:
20-Sep-2021 17:56:08.971 INFO [Catalina-utility-1]…

hell_storm2004
- 1,401
- 2
- 33
- 66
2
votes
3 answers
Upgrading from Spring 4 to Spring 5 - NoClassDefFoundError: org/springframework/core/JdkVersion
I am upgrading my Spring project from version 4.3.23 to version 5.2.13
I have the following code in my ldap.xml file in the project which was working fine in 4.3.23 but erroring out in 5.2.13:

Vamsi
- 619
- 3
- 9
- 22
2
votes
1 answer
How to get DataSource bean from config in the Junit5
Dears,
I have created a junit5 test case ( UserDaoTests.java) but I am not able to get DataSource Bean defined in the spring configuration file (data.xml).
Project Structure:
test cases are defined in test/com/caveofprogramming/spring/test/tests…

Wolfgang
- 515
- 1
- 11
- 41
2
votes
0 answers
How to Handle backpressure in spring cloud steam reactive
I am using Spring Cloud to consume a Kafka topic, do some processing and store the result in a Mongo DB. I noticed that if my consumer is slow in processing that the Memory consumption climbs rapidly until bringing the service down.
Further Analysis…

hassan
- 31
- 3
2
votes
1 answer
Flux of strings emitted time to time
My problem: I want to create a stream of string that will be be sent from controller from time to time.
Processing started!
Step 1 completed. (This might be sent after 5 seconds or 10 minutes.)
Process completed. …

full_stuck_developer
- 225
- 4
- 15
2
votes
1 answer
Reactor Spring WebFlux: Explain please difference between last() and takeLast() methods
Can anybody explain me difference between last() and takeLast() methods ?
As documentation tell:
last() - Emit the last element observed before complete signal as a Mono, or emit NoSuchElementException error if the source was empty. For a passive…

Kirill Sereda
- 469
- 1
- 10
- 25
1
vote
0 answers
java.lang.reflect.InaccessibleObjectException:throws java.lang.CloneNotSupportedException
I have upgraded java8 to 17 and spring4 to 5 , I am getting a test case failed.
java.lang.reflect.InaccessibleObjectException: Unable to make protected native java.lang.Object java.lang.Object.clone() throws java.lang.CloneNotSupportedException…

Aditi Mogha
- 13
- 3
1
vote
0 answers
Spring 5 does not support old Classes. How can I upgrade project?
I have just upgraded Spring dependencies to version 5.3.23 and noticed that class SimpleJdbcDaoSupport and ParameterizedRowMapper are not supported any more. Then how can I accommodate my code upgrading with Spring 5.x?
import…

Jayanta Pramanik
- 89
- 8