No mapping found for HTTP request with URI [/***] in DispatcherServlet with name & #39; dispatcherServlet & #39 ;,

Source: Internet
Author: User

No mapping found for HTTP request with URI [/***] in DispatcherServlet with name 'dispatcherservlet ',

I believe that many beginners of Springboot, like me, have encountered the above prompt. Obviously, the path is correct, but they cannot find the correct page and 404, which has plagued me for a long time, I cannot solve the problem either. Baidu also rarely answered the question reasonably, because everything was normal in the past, which made me suspect that it was an idea problem, I have also re-installed and created many projects to experiment. This greatly delays my graduation design. In this way, when can I graduate.

One day, when I came back from the company with exhaustion and sat in front of the computer, I suddenly remembered some situations in the company. Then I looked at my project and found that, my target (the maven project is taget, And the gradle project is out), it seems that the information is not very complete, and my template is missing, and the xml file I made by mybaits is not scientific, so I am also Baidu, and I am also wondering why a good project does not generate a correct target.

Under constant pursuit, I recently solved this problem, mainly the metadata of pom. xml. Add the following after the dependencies label because it determines what the target is packaged.

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/**.*</include>
</includes>
</resource>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
</resource>

</resources>
</build>

If you have a good job introduction, you can add me 1471914707, or you can enjoy it.

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.