Affects: 5.2.6


In multi-module projects, FreeMarkerConfigurationFactory only can load first match resource which is in classpath. for example:

|-- projectA  
|-- resource
| |-- templates
| | |-- test1.ftl
| |-- projectB 
| | | -- resource
| | |-- templates
| | | |-- test1.ftl
|-- projectC  
|-- resource
| |-- templates
| | |-- test1.ftl

using command

java -classpath "${BASE_PATH}/projectA/target/classes;${BASE_PATH}/projectB/target/classes;${BASE_PATH}/projectA/target/classes;" Demo

using path config classpath:/templates/,but freemarker only can load projectA template files.

Comment From: sbrannen

Superseded by #24930

Comment From: bclozel

I think this is the expected behavior and the application should use instead the classpath*:/templates/ pattern to express that resources should be resolved from multiple classpath locations. I've closed #24930 as a result.