![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
spring boot
生活因我绚丽
独立寒川上,春秋任剪裁。万千凡尘事,随心作安排。
展开
-
第一次 搭建spring boot 项目404
网上搭建spring boot的教程很多,随便查找一个搭建试试,果不其然出现了404! 新建controller做测试,发现请求404. 于是网上查看资料,可能是controller初始化失败,没有扫描到该controller注解,然后又去翻阅官方的资料。发现SpringBootApplication注解虽然相当于spring的三个注解之和,@EnableAutoC...原创 2018-04-12 10:26:26 · 3294 阅读 · 3 评论 -
springboot中 使用了filter, @Autowired bean对象null
原文地址:https://my.oschina.net/goulin/blog/1820070在springboot中 使用了filter, 并且注入了业务bean和redis工具类, 最后一上tomcat全完蛋,注入的bean都是null, 只能自行填坑 . 首先是在使用@webfilter的情况下,不上外部tomcat时是没有问题的, 所以如果你的项目不上外部tomcat应该不会踩到坑里来填坑...转载 2018-05-28 17:57:03 · 4730 阅读 · 1 评论 -
springboot2以上版本设置session超时时间
在springboot2.0之后,设置session超时的方式修改为在application.yml或application.xml上面添加server.servlet.session.timeout=DT1MPT1M 意思是设置session失效的时间是1分钟。扩展:Duration 通过查看springboot源码发现setTimeouot方法,这里要求传入Durat...原创 2019-04-10 10:50:27 · 22454 阅读 · 7 评论 -
springboot yml文件@@报错
springboot报错org.yaml.snakeyaml.scanner.ScannerException: while scanning for the next token found character '@' t方案一:此时在pom文件中添加snakeyaml插件。<dependency><groupId>org.yaml</groupId...原创 2019-04-12 16:00:59 · 4622 阅读 · 0 评论