Skip to content

Tag: spring

How to log errors in a EnvironmentPostProcessor execution

I have created an EnvironmentPostProcessor in SpringBoot to fetch properties from database and attached it to the Spring’s Environment as a PropertySource. This is the code I have: And this is the main/META-INF/spring-factories file had to be created: The code works well, it fetches from the db what I n…

Spring and JMS DynamicDestinationResolution

I am using the latest Spring 4 and ActiveMQ to put JMS messages on a queue. Using the JMSTemplate, I have a default queue, and the sample code I have lets me put a message on the default queue with no issues. There is also a sample code that lets me put a message on a Destination … this is

Synchronize Gradle projects with workspace failed

I’ve the Spring Tool Suite v3.8.3 and its component Spring IDE v3.8.4.201702201939-CI-B1500. I’ve also the Gradle Buildship v2.0. I created a project with JHipster v4.0.5 but is not possible to import it. (there were not errors before the Gradle Buildship 2). Below the error: Synchronize Gradle pr…

Java 8 generic Retry if specific exception

I’m finding myself writing alot of retry loops that look like I want to write a generic function that accepts a Lambda and only retries on a specific error (in the above case thats SocketTimeoutException). I’ve seen some functions that accept a Runnable which is fine, but they don’t seem to …