I have a spring boot application & this piece of code as below
@ConfigurationProperties(prefix = “asynchronous-helper”)
public class AsynchronousHelper {
private transient ExecutorService executor;
}
In properties file I have
asynchronous-helper.executor.maximumPoolSize=10
asynchronous-helper.executor.corePoolSize=10
While maximumPoolSize works corePoolSize fails with below error
Failed to bind properties under ‘asynchronous-helper.executor’ to java.util.concurrent.ExecutorService:
Property: asynchronous-helper.executor.corepoolsize
Value: 10
Origin: “asynchronous-helper.executor.corePoolSize” from property source “class path resource [backend-product.properties]”
Reason: Failed to bind properties under ‘asynchronous-helper.executor’ to java.util.concurrent.ExecutorService
Action:
Update your application’s configuration
Concrete class of the executor is java.util.concurrent.ThreadPoolExecutor
Any idea why this happens & how to resolve it?