學習SpringBoot遇到的問題(1)路由返回靜態頁面,卻返回了靜態檔案的路徑
一、路由返回靜態頁面,卻返回了靜態檔案的路徑
解決:
1、註解使用錯誤
controller類的註解應該是 @Controller
而不是@RestController
前者只要返回RseonBody,後者可返回頁面
2、上述設定成功,卻報錯,形如:
Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as a fallback. Thu Oct 11 20:53:09 CST 2018 There was an unexpected error (type=Internal Server Error, status=500). Exception parsing document: template="/up", line 6 - column 3
注意到最後一行,此時應該是HTML的語法出現了錯誤,去排除即可。可以看出我的有個地方沒有閉合標籤,話說,這規則也太嚴苛了。
相關推薦
學習SpringBoot遇到的問題(1)路由返回靜態頁面,卻返回了靜態檔案的路徑
一、路由返回靜態頁面,卻返回了靜態檔案的路徑 解決: 1、註解使用錯誤 controller類的註解應該是 @Controller 而不是@RestController 前者只要返回RseonBody,後者可返回頁面 2、上述設定成功,卻報錯,形如: Whitelabe
曹工說mini-dubbo(1)--為了實踐動態代理,我寫了個簡單的rpc框架
#相關背景及資源: 之前本來一直在寫spring原始碼解析這塊,如下,aop部分剛好寫完。以前零散看過一些文章,知道rpc呼叫基本就是使用動態代理,比如rmi,dubbo,feign呼叫等。自己也就想著試一下,於是有了mini-dubbo這個東西,暫時也不能稱為一個框架,因為還不是生產級的,目前只是實現了一
Python學習手冊筆記(1):Python對象類型
python 在Python中一切皆對象,Python程序可以分解為模塊、語句、表達式及對象。如下所示:1 程序由模塊組成2 模塊包含語句3 語句包含表達式4 表達式建立並處理對象 內置對象(核心類型):1)數字:>>> 2+2 #整數加法4>>&g
Pro Android學習筆記 ActionBar(1):Home圖標區
ces tom 新的 方便 find rac vertica lba manifest ?? Pro Android學習筆記(四八):ActionBar(1):Home圖標區 2013年03月10日 ? 綜合 ? 共 3256字 ? 字號 小 中 大 ? 評論關閉
2017-5-29學習記錄——WebApi(1)
ora 必須 eache 配置 person span eve gen 流行 曾經我一直認為Web服務器的Api使用ashx或ASP.NET MVC中返回JsonResult來實現的。 當我第一次接觸WCF的時候,有同學告訴我目前比較流行WebApi和WebSocket了,
bootstrap源碼學習:輔助(1)
div max uid 排列 lock oot 引用 flex ots .blockquote-footer::before { content: "\2014 \00A0"; } 引用的腳步~效果是插入了“—”,可以做一個署名。 .container { m
[Python接口自動化]從零開始學習python自動化(1):環境搭建
help ins cnblogs 文件中 ssi 空格 plugins 變量 mod 第一步:安裝python編譯環境 安裝python編譯環境之前,必須保證已安裝jdk哈,如果為安裝,請參考https://jingyan.baidu.com/article/6dad507
FPGA小白學習之路(1) System Verilog的概念以及與verilog的對比
函數返回 enable 傳遞 轉換操作符 st2 輸出 時間值 擴展 isa 轉自CSDN:http://blog.csdn.net/gtatcs/article/details/8970489 SystemVerilog語言簡介 SystemVerilog是一種硬件描
《javascript 高級程序設計》學習總結 三(1)
java 關鍵字 下一個 引用 global 討論 其他瀏覽器 而後 rom 引言:任何語言的核心都必然會描述這門語言的最基本的工作原理,而描述的內容通常都要涉及這門語言的語法、操作符、數據類型、內置功能等用於構建復雜解決方案的基本概念。 今天我就這些基本的概念開始進
python3網絡爬蟲學習——使用requests(1)
返回 hub origin 存儲 python3 中文 json head flat reuqests庫中有很多便捷的方法,比如以GET方式獲得網頁,在requests庫中就是方法get(),上代碼 import requests r = requests.get(‘ht
前端學習之HTML(1)
HTML標籤學習 2018-10-31 記錄一下學習的網站 http://www.w3school.com.cn http://www.runoob.com/ 1 <!DOCTYPE html> 2 <html> 3 4 <head>
深度學習分割:(1)資料彙總
時間關係,備份一些深度學習分割演算法相關的部落格和介紹文章。 分割演算法綜述 介紹了幾個比較經典且非常重要的深度學習分割演算法。 原作地址:https://blog.csdn.net/weixin_41923961/article/details/80946586 更加全面的一篇
小李的Java學習之路(1)
第一天 java的面向物件思想 小葉:“為什麼要學習Java呢???” 小李:“因為Java比c語言有趣多了。。。。” 小葉:“你剛學完c語言,來說說c語言和Java的異同之處吧。” 小李:“c語言和Java的語法基礎,程式控制語句大體都是一樣的。主要是不同之處:Java和c的程
《機器學習-西瓜書》-周志華-學習筆記系列(1)--序言、前言和主要符號表
寫在前面的話: 自己於今天(2018年9月4日)看完了機器學習-西瓜書-周志華-清華大學出版社書籍,對於這本書的評價就是:好書,自己可以在每一個字裡行間感受到作者的用心,每當看到一個不懂的名詞的時候,作者都會用通俗的例子來講解,遇到公式的時候,也會進行推導,側邊欄的一些說明資訊往往能帶給自己
HIT機器學習期末複習(1)——機器學習簡介及決策樹
劉楊的機器學習終於上完了惹,下週就要考試了,趕緊複習ing...... 趁機做個總結,就當是複習了惹...... 機器學習簡介 1、什麼是機器學習 簡單來說,就是一個三元組<P, T, E> P——performance效能(對應著效能的評估函式,也就是常說的loss或者likeli
從零開始學習HTML+CSS(1)常用工具與網站
從零開始學習HTML+CSS(1) 開始正式學習HTML+CSS了。第一次培訓具體內容講得不多,主要介紹了一些常用工具和網站。 下面是一點整理: 工具類(個人推薦向): 瀏覽器:Google Chrome 官方下載地址:https://www.google.cn/chrome/ 編輯
springboot實戰(1)springboot基本配置
1 入口類和@SpringBootApplication package com.wuk.springbootHello; import org.springframework.boot.SpringApplication; import org.springframework.b
Vue學習筆記重點(1)
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>todo-list元件版</title> <script
web前端學習(四)JavaScript學習筆記部分(1)-- JavaScript基礎教程
1、JavaScript基礎教程 1.1、Javascript基礎-介紹、實現、輸出 1.1.1、JavaScript是網際網路上最流行的指令碼語言,這門語言可用於web和HTML,更可廣泛用於服務端、pc端、移動端。 1.1.2、JavaScript指令碼語言 JavaScript是一種輕量級的
QMUI Android的學習——(1)引入庫配置主題,並實現沉浸式狀態列效果
最近進行安卓方面的學習,其中用到了騰訊開源的Android UI框架——QMUI Android,這是一個封裝完善的Android UI元件庫,可以給專案的開發提高了很高的工作效率,但是官方的API文件並不是很詳細,所以需要花費時間通過對官方給出的QMUIDEMO進行學習。 這是官方網站:htt