Spring boot does not use the Thymeleaf template to pass the response path within a variable control without using @getpaing annotations

Source: Internet
Author: User

A strange thing happened today:

In the Springboot control class, the response path "/hello" uses @requestmapping annotations to be accessed normally.

@RequestMapping (value = "/hello", method = requestmethod.get) public    String Hello (model model) {        Model.addattribute ("name", "Dear");        return "Hello";    }

Shown below:

However, if you add another response path to the same type using the @getmapping annotation, the access error will be raised.

There are 2 response paths in a control that point to the same template, which I found to be the reason, but why? Ask the great gods to answer them?

Spring boot does not use the Thymeleaf template to pass the response path within a variable control without using @getpaing annotations

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.