报错:
org.xml.sax.SAXParseException: 对实体 “tag” 的引用必须以 ‘;’ 分隔符结尾。
例如:
hot
错误原因:
Themleaf 是xml模板不能输入 & 符号 应该用 &代替
HTML的 <, >, & ,",© 分别是<,>,&,”,© 的转义字符
Spring boot controller返回html静态文件:
https://www.jianshu.com/p/eb4c0fc2dfc4
定位页面的目录到static/下(src/main/resources)
spring.mvc.view.prefix=/
spring.mvc.view.suffix=.html
控制层
@GetMapping("/index")
public String index(){
return “home”; //当浏览器输入/index时,会返回 /static/home.html的页面
}
在浏览器中输入:http://localhost:8080/index就可以定位到static下的index.html页面了
springBoot - 异常 - Cannot expose session attribute ‘user’ because of an existing model object of the:
https://blog.csdn.net/sinat_32238399/article/details/82107727
SpringBoot学习心得
最新推荐文章于 2023-12-10 22:50:33 发布