我要像这样在spring.freemarker.template-loader-path
中配置application.yml
:
如果设置了EXTERNAL_TEMPLATES
,则将其设置为
file:${EXTERNAL_TEMPLATES},classpath:/templates
如果未设置:
classpath:/templates
我能想到的最好的方法是:
spring.freemarker.template-loader-path: ${EXTERNAL_TEMPLATES:classpath:/templates},classpath:/templates
但是如果未设置file:
,这会错过前面的classpath:/templates
并包括两次EXTERNAL_TEMPLATES
。
我怎么有这样的条件?