-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Confusing error message when trying to render a template as a static web page #855
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Try putting your HTML in |
Maybe the error message could specify the location that it is expecting to find files it is looking for? |
It's a core Spring exception so we can't change it. Perhaps we could offer some strategy to log hints for specific exceptions. That might work well with the development environment idea (i.e. hints are only really needed during development). |
Is that not a template framework / web technology used ? AFAIK e.g use Freemarker and you will have better errors than using My 2 cents is that a fancy error page depends on the web view technology On Wed, May 14, 2014 at 4:13 PM, Adam Berlin [email protected]:
|
If you consider Spring Boot is the framework that we are interacting with, as shown here https://spring.io/platform I think that usability improvements for the underlying spring projects belong here in Boot. |
So I hate to beat a dead horse here, but I am a Spring Boot new guy, coming from old Spring (its been 2+ years) and am running into this issue using Freemarker. Is there some configuration properties I need to set? Do I put the .html file in /templates or /static? From the error messages I receive it seems like /templates: Cannot find template location(s): [classpath:/templates/] please add some templates, check your FreeMarker configuration, or set spring.freemarker.checkTemplateLocation=false |
That does not seem to be the same issue to me. The exception message is pretty clear IMO: it tells you that because freemarker is active (sub-text: you added the dependency), then it expects some templates to be found in Does that make sense? |
Fixed in 1.3.x, but this error is still logged - see #2001 for the remaining parts to be fixed. |
Starter web applications should be able to return html files without any templating dependency.
The text was updated successfully, but these errors were encountered: