springboot 使用thymeleaf url get请求传多个参数问题解决

位置:首页>文章>详情   分类: 教程分享 > Java教程   阅读(2951)   2023-03-28 11:29:14

1.问题描述

在使用thymeleaf模板中,有些时候需要绝对路径带多个参数的地址访问其他页面,这时候由于&字符的问题会报错:
org.xml.sax.SAXParseException: 对实体 "xxx" 的引用必须以 ';' 分隔符结尾。

2.问题解决

使用逆转字符代替&,>,<这些符号
例如:
<a class="third-login-qq" 
   href="https://graph.qq.com/oauth2.0/authorize?     response_type=code&amp;client_id=101395666&amp;redirect_uri=http://www.leftso.com/user/login.html&amp;scope=get_user_info&amp;state=test"  
   id="qqLoginBtn"></a>
地址:https://www.leftso.com/article/257.html

相关阅读

springboot 使用thymeleaf 模板引擎中url中的&引起的org.xml.sax.SAXParseException: 对实体 "uid" 的引用必须以 ';' 分隔符结尾。问题解决
一、项目环境Spring Boot 2.1.2.RELEASEshiro-spring 1.4二、去掉URL jsessionid在shiro配置中,配置关闭url中显示sessionId ...
SSH/SSM项目中如何集成thymeleaf?本文将讲解SSH/SSM项目中如何集成thymeleaf模板引擎
Thymeleaf 递归,Thymeleaf模板引擎递归展示如评论留言等场合适用
本文说一下在thymeleaf模板引擎中,如何给 textarea 赋值
thymeleaf模板 报错信息:​​​​​​​org.thymeleaf.exceptions.TemplateInputException: Error resolving template...
thymeleaf 设置不校验html标签
window.location.href 新窗口,在编写代码的时候我们总是有在javascript中进行新窗口的打开,本文讲解如何在js中打开新窗口,新窗口打开,javascript,windo...
cxf、Springboot、webservice 源文:https://www.cnblogs.com/fuxin41/p/6289162.html