![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Springboot
7先生丶
这个作者很懒,什么都没留下…
展开
-
Springboot [Error]type=Not Acceptable, status=406 控制台:org.springframework.web.HttpMediaTypeNotAccept
使用@RestController注解返回Json格式运行后网页报错:type=Not Acceptable, status=406控制台爆红:org.springframework.web.HttpMediaTypeNotAcceptDEBUG发现:是有返回出来json的解决方法:调用的实体类上加上@Data注解...原创 2022-03-17 00:22:35 · 676 阅读 · 0 评论 -
Springboot 引入css报错404not found解决,无法加载css
在网上查了半天都没有找到正确的解决方法,后面找到在pom.xml文件的build中添加:<!--自己项目中有什么后缀的文件就添加进去--><resources> <resource> <directory>src/main/resources</directory> <includes> <include>**/*.yml</include>原创 2022-03-27 20:33:48 · 1143 阅读 · 2 评论 -
Springboot项目配置Freemarker模板报错:There was an unexpected error (type=Not Found, status=404)
如果启动类已经放在根路径,并且总pom.xml也已经导入freemarker的依赖项:那就有可能是没有在application.yml文件中配置模板文件目录和模板文件结尾,引入:spring: freemarker: allow-request-override: false cache: false check-template-location: true charset: UTF-8 content-type: text/html; charset=原创 2022-03-26 17:05:29 · 1056 阅读 · 0 评论