ERROR org.apache.velocity : ResourceManager : unable to find resource 'xxx.html.vm' in any resource loader

Claire picture Claire · Jan 26, 2016 · Viewed 9.8k times · Source

I'm using Velocity templates along with Spring boot.

When there is a file named 'xxx.vm' in templates directory, Spring Boot successfully loads 'xxx.vm'. But an ERROR message below is logged.

"ERROR org.apache.velocity : ResourceManager : unable to find resource 'xxx.html.vm' in any resource loader."

I don't understand why the system looks for 'xxx.html.vm' because the suffix in the application.properties is set to ".vm"

Here is configuration in application.properties

spring.velocity.enabled=true
spring.velocity.resource-loader-path=classpath:/templates/
spring.velocity.suffix=.vm

There is no problem with running my application, but I'd like to know what causes this Error message. Could you please help me deal with this? Thank you in advance.

Answer

juergen haferkamp picture juergen haferkamp · Mar 4, 2016

Add the following row to application.properties :

spring.velocity.view-names=xxx,yyy,zzz