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

來源:互聯網
上載者:User

標籤:介紹   pom.xml   問題   uil   重裝   map   isp   工作   好的項目   

  相信不少Springboot初學者和我一樣,都遇到上邊這個提示,明明路徑都是對的,但就是找不到對於的頁面而404了,這也困擾我很長一段時間,我也是不得其解,百度上也鮮有合理回答,因為以前使用的時候,明明一切都很正常,這也讓我疑神疑鬼了,一度懷疑是idea的問題,也重裝了,還建了很多次項目來實驗,這大大地拖延了我的畢業設計,這樣下去,我什麼時候才能畢業。

  有一天,我帶著疲憊從公司回來,坐在電腦前的我,突然想起了在公司的一些狀況,再看到了我的項目,發現,我的target(maven項目是taget,gradle項目是out),它好像資訊不是很全,少了我的template,也少了我mybaits做的xml檔案,這不科學,於是我也百度,也在想為什麼好好的項目就是沒有產生對的target。

在不斷的追求下,我最近解決了這個問題,主要就是pom.xml的媧。在dependencies標籤之後添加下面這個,因為它決定這target的打包什麼。

<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>

 大家有好工作介紹,也可以添加我1471914707,或者加了打賞一下。

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

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.