国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

o.s.web.servlet.PageNotFound No mapping for GET

這篇具有很好參考價(jià)值的文章主要介紹了o.s.web.servlet.PageNotFound No mapping for GET。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問。

o.s.web.servlet.PageNotFound : No mapping for GET

出現(xiàn)這種情況主要原因是springMVC配置類出了問題

springMVC默認(rèn)會(huì)將所有的靜態(tài)資源攔截,所以需要重寫,并放行

@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
    registry.addResourceHandler("/**").addResourceLocations("classpath:/static/");
}

同時(shí)確保已經(jīng)配置好了properties中的配置

#訪問靜態(tài)資源路徑
spring.mvc.static-path-pattern=/static/**

spring.web.resources.static-locations=classpath:static/

然后就可以愉快的訪問了文章來源地址http://www.zghlxwxcb.cn/news/detail-794588.html

到了這里,關(guān)于o.s.web.servlet.PageNotFound No mapping for GET的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • swagger-bootstrap-ui 報(bào)錯(cuò)No mapping for GET /doc.htm,404l,以及無法顯示接口文檔

    首先是訪問http://ip:/doc.htmlhttp://${host}:${port}/doc.htmlhttp://ip:/doc.html報(bào)錯(cuò) 1、假如是SpringSecurity項(xiàng)目,可能是configure(WebSecurity web)沒有放行,代碼如下 在啟動(dòng)類中修改成如下代碼 Swagger配置類 Controller類 ?Swagger依賴

    2024年02月13日
    瀏覽(24)
  • No mapping found for HTTP request with URI

    No mapping found for HTTP request with URI

    參考: 參考地址 ssm老項(xiàng)目,接過來別人的項(xiàng)目 臨時(shí)建了一個(gè)Controller方便測(cè)試用的,結(jié)果訪問掉不通,報(bào): No mapping found for HTTP request with URIxxxx 這樣的錯(cuò)誤 看了下web,xml配置 在 webmvc-config.xml 配置文件里面添加了幾行配置 說明: com.iph.hiring.headcount.api.service.* 是我Controller所在的地址,

    2024年02月11日
    瀏覽(20)
  • No primary or default constructor found for interface javax.servlet.http.HttpServletRequest

    前言: 前不久在寫開放平臺(tái)項(xiàng)目中,想直接在微服務(wù)網(wǎng)關(guān)Gateway中寫對(duì)外接口,并想通過傳統(tǒng)的HttpServlet方式去拿請(qǐng)求里面的數(shù)據(jù),在Controller的方法參數(shù)上加上HttpServerRequest卻發(fā)現(xiàn)報(bào)錯(cuò)。 1、問題復(fù)現(xiàn) 在我們使用spring-boot-starter-web依賴的時(shí)候,我們可以在controller的接口類的方法

    2024年02月16日
    瀏覽(21)
  • 解決There is no PasswordEncoder mapped for the id “null“問題

    解決There is no PasswordEncoder mapped for the id “null“問題

    springsecurity從4.2升級(jí)到5.0之后,做簡(jiǎn)單的登錄,出現(xiàn)如下所示的錯(cuò)誤: 根據(jù)官方文檔的資料和網(wǎng)上解決辦法,需要做一些修改。 默認(rèn)情況下與4.2版本不同的是,springsecurity5.0密碼加密方式采用了bcrypt的方式,而且密碼直接配置在xml文件中,不光是需要使用BCryptPasswordEncoder來加

    2023年04月09日
    瀏覽(83)
  • 解決:Springboot啟動(dòng)報(bào)錯(cuò) Whitelabel Error Page: This application has no explicit mapping for

    目錄 解決:Spring Boot啟動(dòng)報(bào)錯(cuò) Whitelabel Error Page: This application has no explicit mapping for 問題背景 解決步驟 第一步:檢查代碼 第二步:檢查Spring Boot配置 第三步:檢查Controller層 第四步:檢查依賴項(xiàng) 第五步:重啟應(yīng)用 總結(jié) @RequestMapping @GetMapping @PostMapping 當(dāng)我們使用Spring Boot框架開

    2024年02月03日
    瀏覽(22)
  • ingress-http部署error: resource mapping not found for name...no matches for kind “Ingress“ in version

    ingress-http部署error: resource mapping not found for name...no matches for kind “Ingress“ in version

    根據(jù)一些參考文檔,學(xué)習(xí)部署 ingress-http 服務(wù),出現(xiàn)了一些error信息,網(wǎng)上難找直接的處理方式,最后才發(fā)現(xiàn)是資源清單使用問題,還是得看官方文檔說明。 創(chuàng)建ingress-http.yaml 使用的基本yaml配置如下—— 部署ingress服務(wù) 出現(xiàn)error信息 錯(cuò)誤一: 處理方式—— 根據(jù) 官方文檔:

    2024年02月06日
    瀏覽(22)
  • 解決錯(cuò)誤Whitelabel Error Page This application has no explicit mapping for /error(Method Not Allowed405)

    解決錯(cuò)誤Whitelabel Error Page This application has no explicit mapping for /error(Method Not Allowed405)

    在提交表單數(shù)據(jù)的時(shí)候,由于控制器controller中mapper處理頭映射錯(cuò)誤,導(dǎo)致出現(xiàn)PUT405錯(cuò)誤代碼。 修復(fù)的方法有: ①修改URL映射鏈接和映射方式 ②如果URL沒問題的話,可能是沒有添加springboot的全局掃描,導(dǎo)致映射失敗. 進(jìn)入SpringbootApplication代碼中查看是否添加全局掃描@MapperS

    2024年02月11日
    瀏覽(25)
  • “error“ : “no handler found for uri [/test1/_doc/1/update?pretty=true] and method [POST]或者[GET]“

    “error” : “no handler found for uri [/test1/_doc/1/update?pretty=true] and method [POST]或者[GET]” 一、GET 報(bào)錯(cuò)原因:type被棄用! 報(bào)錯(cuò): 解決辦法:將type修改為_doc,默認(rèn)的數(shù)據(jù)類型 PUT創(chuàng)建新的索引成功 二、POST 報(bào)錯(cuò)原因:語法更新,原來的語法有可能是錯(cuò)的 報(bào)錯(cuò): 解決辦法: 成功修改

    2024年02月12日
    瀏覽(18)
  • spring boot kotlin webflux 或 web 多文件上傳 報(bào)錯(cuò)400 415 No primary or single unique constructor found for

    spring boot kotlin webflux 或 web 多文件上傳 報(bào)錯(cuò)400 415 No primary or single unique constructor found for

    #當(dāng)我們使用Kotlin編寫Spring Boot進(jìn)行多文件上傳的時(shí)候,傳統(tǒng)的方法如下: 此時(shí)會(huì)有如下幾種情況: 以上是第一種情況,直接報(bào)錯(cuò),并提示無主構(gòu)造函數(shù)。這時(shí)我們通過互聯(lián)網(wǎng)搜索可能會(huì)在形參上加上: @RequestParam (web)或者 @RequestPart (webflux)。如下: 然后后端沒報(bào)錯(cuò)了,返回值

    2024年02月15日
    瀏覽(22)
  • Learning C++ No.23【紅黑樹封裝set和map】

    Learning C++ No.23【紅黑樹封裝set和map】

    北京時(shí)間:2023/5/17/22:19,不知道是以前學(xué)的不夠扎實(shí),還是很久沒有學(xué)習(xí)相關(guān)知識(shí),對(duì)有的知識(shí)可以說是遺忘了許多,以該篇博客有關(guān)知識(shí)為例,我發(fā)現(xiàn)我對(duì)迭代器和模板的有關(guān)知識(shí)的理解還不夠透徹,不知道是對(duì)以前知識(shí)的遺忘,還是現(xiàn)在所學(xué)確實(shí)有難度,反正導(dǎo)致我很懵

    2024年02月05日
    瀏覽(26)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包