I'm using spring jobs in a Grails 5.2.5 application. This application serves to run X (defined by the reports.total
configuration) reports at the same time.
For correct operation, the spring.task.scheduling.pool.size
configuration must be equal to or greater than the total number of jobs, to comply with reports.total it would need to be 3+reports.total
(the value is 3 because currently there are 3 jobs that need to run concurrently)
reports:
total: 1
spring:
task:
scheduling:
pool:
size: 3+reports.total
I tried the following values, but without success:
${reports.total} + 3
{${reports.total} + 3}
3 + reports.total
${reports.total + 3}
${4+1}
4+1
#{${reports.total} + 3}
$(( ${reports.total} + 3 ))
Always return something like this:
Failed to bind properties under 'spring.task.scheduling.pool.size' to int:
Property: spring.task.scheduling.pool.size
Value: ${4+1}
Origin: "spring.task.scheduling.pool.size" from property source "Config resource 'class path resource [application.yml]' via location 'optional:classpath:/'"
Reason: failed to convert java.lang.String to int (caused by java.lang.NumberFormatException: For input string: "${4+1}")
Grails 5.2.5 - JDK 11.0.16