Error resolving template:template might not exist or might is accessible is a shrinkage error?

Source: Internet
Author: User

One

Thymeleaf local debugging is normal at the time of development, but it is reported in the test environment as a jar package.

Two

Template might not exist or might isn't be accessible

It's just a translation.

The template may not exist or cannot be connected

At this time I am in the test environment directly with static resources to find, can be found. However, if you go Springmvc, you will report the mistake.

Well, obviously thymeleaf this error is problematic.

Three

The end, the error is a problem, I how to locate the wrong AH!!!

Then I shorted the logic ....

Four

Don't be afraid, I have Baidu.

Directly with template might not exist or might isn't be accessible go to Baidu, and then find the answer. Most of them are like this

In fact, this problem is also very good to solve, we just need to reference the template file without the "/" beginning to be able to refer to the way similar to the relative path, but it is necessary to note that the relative path here is still relative to the template root directory to do.

Well, the problem is solved, but I've always been a dead man,,,

Five

Back in an ancient similar error launched the results I want

Error Resolving Template "Home", template might not exist or might not being accessible by any of the configured template Res Olvers

One example

@RequestMapping (value = "/main") public String Tomain () { = "/main"; return page;}

Any of the configured Template resolvers refers to the full page
Translated is the configured template parser.

Then obviously/main error, according to Springboot's default thymeleaf configuration, should be changed to main
If you say so, thymeleaf an error, yes, it just shrinks.

Other words template might not exist or might isn't be accessibleThe full name of the exception may be template might not exist or might is accessible by any of the configured template resolvers

Perhaps the foreign people before the old encounter this problem, already at a glance know what the meaning of said, so Thymeleaf omitted the back of that string,,,,

Six

That's the problem, why development can add/,jar package is not?

Looking for a long time did not find a suitable explanation ah, ask the great God to explain ....

Error resolving template:template might not exist or might is accessible is a shrinkage error?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.