課程
/后端開(kāi)發(fā)
/Java
/2小時(shí)學(xué)會(huì)Spring Boot
為啥我的返回的是 index .....
2017-11-27
源自:2小時(shí)學(xué)會(huì)Spring Boot 4-1
正在回答
雄心部署下
正解 ?index頁(yè)面只留<h1>hello Spring Boot </h1> 別的都刪掉,因?yàn)槭怯昧四0?/p>
html頁(yè)面中只寫<h1>hello Spring Boot </h1>
其他的都刪了
izunqian
請(qǐng)問(wèn)你的問(wèn)題解決了嗎? 我用樓上的試了還是不行
有一個(gè)昵稱
第一需要使用
?<dependency>
? ? ? ? ? ? <groupId>org.springframework.boot</groupId>
? ? ? ? ? ? <artifactId>spring-boot-starter-thymeleaf</artifactId>
? ? ? ? </dependency>
這個(gè)maven依賴
第二需要去掉之前加在對(duì)于映射方法上的注解@RequestBody
或是將@RestController替換成@Controller
PS:我在使用thymeleaf這個(gè)模板插件的時(shí)候遇到無(wú)法啟動(dòng)的錯(cuò)誤,解決方案是:
將pom文件的<properties>標(biāo)簽內(nèi)加上thymeleaf的版本參數(shù)
<thymeleaf.version>3.0.2.RELEASE</thymeleaf.version>
? ?<thymeleaf-layout-dialect.version>2.1.1</thymeleaf-layout-dialect.version>
舉報(bào)
Spring Boot入門視頻教程,你將學(xué)會(huì)使用Spring Boot快速構(gòu)建應(yīng)用程序
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號(hào)-11 京公網(wǎng)安備11010802030151號(hào)
購(gòu)課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號(hào)
2018-01-16
雄心部署下
2017-12-19
正解 ?index頁(yè)面只留<h1>hello Spring Boot </h1> 別的都刪掉,因?yàn)槭怯昧四0?/p>
2017-12-08
html頁(yè)面中只寫<h1>hello Spring Boot </h1>
其他的都刪了
2017-12-05
請(qǐng)問(wèn)你的問(wèn)題解決了嗎? 我用樓上的試了還是不行
2017-11-28
第一需要使用
?<dependency>
? ? ? ? ? ? <groupId>org.springframework.boot</groupId>
? ? ? ? ? ? <artifactId>spring-boot-starter-thymeleaf</artifactId>
? ? ? ? </dependency>
這個(gè)maven依賴
第二需要去掉之前加在對(duì)于映射方法上的注解@RequestBody
或是將@RestController替換成@Controller
PS:我在使用thymeleaf這個(gè)模板插件的時(shí)候遇到無(wú)法啟動(dòng)的錯(cuò)誤,解決方案是:
將pom文件的<properties>標(biāo)簽內(nèi)加上thymeleaf的版本參數(shù)
<thymeleaf.version>3.0.2.RELEASE</thymeleaf.version>
? ?<thymeleaf-layout-dialect.version>2.1.1</thymeleaf-layout-dialect.version>