I have the following Feign Client: The items can contains special characters like : or :: which are being encoded. Request URL becomes something like: https://myservice.com/item/a%3Ab%3A%3Ac Rather than: https://myservice.com/item/a:b::c Can anyone help me understand how can we fix this issue? Answer OpenFeign has an issue tracking: https://github.com/OpenFeign/feign/issues/1190 Guess it will be implemented by spring-cloud-feign once its done. Meanwhile, my workaround
Tag: spring
Can I add seconds to current date without using Calendar Library in Java?
I want to get the current time in Java, and now I want to add 15 seconds above the time. Can I do this with a library other than the Calendar library in java? import java.util.Calendar; public …
How can I fix NoClassDefFoundError when using Spring framework’s WebSocketClient
I am writing a desktop Java application as a web service client. I want to use WebSocket to implement notification “callback” from the server. I am using the Spring framework’s WebSocketStompClient. Below snippet shows how I initialize it: It works perfectly if I run it in IntelliJ IDE, however, if I run by command line “java -cp my.jar MyPackage.MyMainClass”, it
Error processing condition on org.springframework.boot.actuate.autoconfigure.metrics.MetricsEndpointAutoConfiguration
I am a novice Java Spring programmer. I am moving some test code from an older jHipster project to a new one. I added this to the pom.xml to fix a compilation error. This fixed my compilation issue but caused runtime errors. I am now getting these runtime errors. Caused by: java.lang.IllegalStateException: Error processing condition on org.springframework.boot.actuate.autoconfigure.metrics.MetricsEndpointAutoConfiguration Caused by: java.lang.IllegalArgumentException:
How to use blocking queue in Spring Boot?
I am trying to use BlockingQueue inside Spring Boot. My design was like this: user submit request via a controller and controller in turn puts some objects onto a blocking queue. After that the consumer should be able to take the objects and process further. I have used Asnyc, ThreadPool and EventListener. However with my code below I found consumer
package org.springframework.cloud.netflix.zuul does not exist
I am moving some test code from an older jHipster project to a new one. The old project uses the org.springframework.cloud.netflix.zuul library, specifically org.springframework.cloud:spring-cloud-netflix-core:1.3.0.RELEASE . I put the below in my new project’s pom.xml: However, it seems to be pulling in org.springframework.boot:spring-boot:2.2.5.RELEASE. This release does not contain zuul in it however, as this code fails import org.springframework.cloud.netflix.zuul. Does anyone know
Dynamic search term SQL query with Spring JPA or QueryDSL
I am trying to learn QueryDSL in order to return the results of a single search term from Postgres: But I also want to search for any number of search terms, for example, say this is my list of search terms divided by the plus symbol: How can I dynamically create contains(params[0]) AND/OR contains(params[1] AND/OR … contains(params[n]) using either QueryDSL
JPA @PreUpdate @Persist seems not working as expected
I have a problem for filling auditing fields by using @PreUpdate and @PrePersist. For instance When I’d like to update a client entity, the field updatedBy and updatedAt are still null; despite when I debug, the code of preUpdate() which is annotated with @PreUpdate is executed. Below the code of AuditingField which is responsible for creating/updating the auditing fields in
Spring Batch : Remove stack trace of run time exception from exit description
In my Spring Batch Job if there is an unhandled exception in step ItemWriter (for ex Primary Key Violation because of bad data while saving to DB), my job fails and then I get another error because core spring batch is not able to update the failed exit status to BATCH_JOB_EXECUTION table. The Reason Being that the exit Description has
HTTP Status 404 – Not Found: for controller – no view resolvers found in Idea
I have the following Spring MVC code: config files: contollers: I get the following errors when I deploy: Accessing the /api page, however, works just fine. EDIT: After replacing home.html with home, the error is still present – both in IDE and the 404 in browser: Also maybe it’s relevant – I get this pop up at one of the