5.Url表达式-thymeleaf

th:href

<a th:href="@{http://www.baidu.com}">绝对路径</a><br/>
<a th:href="@{/show5}">相对路径,相对于当前项目的根,相对于项目的上下文的相对路径</a><br/>
<a th:href="@{~/project2/resourcename}">相对于服务器的根</a><br/>
<a th:href="@{/show5(id=1,name=zhagnsan)}">相对路径-传参</a><br/>
<a th:href="@{/restful/54212}"> 相 对 路 径 - 传 参-restful</a><br/>

restful-controller

@RequestMapping("restful/{id}")
@ResponseBody
public String showInfo6(@PathVariable Integer id){
    System.out.println("restful id:"+id);
    return "id:"+id;
}
作者:Yuyy
博客:https://yuyy.info
暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇