当前位置: 动力学知识库 > 问答 > 编程问答 >

java - Getting velocity error "unable to find resource 'error.vm' in any resource loader."

问题描述:

I have a REST API based on Spring boot 1.3.3. I use Velocity only for email template.

There is no JSP/HTML view. I use exclusively RestController from Spring.

Sometimes, I get this error: "ResourceManager : unable to find resource 'error.vm' in any resource loader."

It's exclusively this vm file which is requested.

Should I disable something to my Spring Boot app to disable this error?

网友答案:

I believe Velocity is looking for this template if it has an errors so you may have a problem with a template and it trying to get the error content but cannot. Per http://s2velocity.sandbox.seasar.org/en/error_template.html "when an error caught in a view template and rendering is forwarded to error.vm."

You can change the name of this in the property files according to the documentation.

I don't think you want to suppress these messages so you should try to catch the errors and see what the problem is.

分享给朋友:
您可能感兴趣的文章:
随机阅读: