Description:
Currently we are receiving a lot of warnings when starting a composed task. During our migration we found out that the lookup of the table prefix is broken as the relax binding rules of spring are resolving the property TABLEPREFIX to tableprefix instead of tablePrefix
See:
{"timestamp":"2024-06-27T10:17:41.283+0200","level":"WARN","thread":"main","logger":"org.springframework.cloud.dataflow.composedtaskrunner.ComposedTaskRunnerConfiguration","message":"Cannot find app.s3-uploader-app.spring.cloud.task.tablePrefix in {...., app.s3-uploader-app.spring.cloud.task.tableprefix=BOOT3TASK,....}
Release versions:
2.11.2
Custom apps:
N/A
Steps to reproduce:
Just launch a task with the new CTR
Screenshots:
N/A
Additional context:
N/A
Solution:
Replace code:
logger.debug("addTaskExplorer:{}", taskName);
String propertyName = String.format("app.%s.spring.cloud.task.tablePrefix", taskName);
String prefix = properties.getComposedTaskAppProperties().get(propertyName);
if (prefix == null) {
prefix = env.getProperty(propertyName);
}
if (prefix != null) {
TaskExecutionDaoFactoryBean factoryBean = new MultiSchemaTaskExecutionDaoFactoryBean(dataSource, prefix);
logger.debug("taskExplorerContainer:adding:{}:{}", taskName, prefix);
explorers.put(taskName, new SimpleTaskExplorer(factoryBean));
} else {
logger.warn("Cannot find {} in {} ", propertyName, properties.getComposedTaskAppProperties());
}
Description: Currently we are receiving a lot of warnings when starting a composed task. During our migration we found out that the lookup of the table prefix is broken as the relax binding rules of spring are resolving the property
TABLEPREFIX
totableprefix
instead oftablePrefix
See:
{"timestamp":"2024-06-27T10:17:41.283+0200","level":"WARN","thread":"main","logger":"org.springframework.cloud.dataflow.composedtaskrunner.ComposedTaskRunnerConfiguration","message":"Cannot find app.s3-uploader-app.spring.cloud.task.tablePrefix in {...., app.s3-uploader-app.spring.cloud.task.tableprefix=BOOT3TASK,....}
Release versions: 2.11.2
Custom apps: N/A
Steps to reproduce: Just launch a task with the new CTR
Screenshots: N/A
Additional context: N/A
Solution:
Replace code:
With:
in the CTR. You might need to downport it if you don't want to use Java 17. 😁