spring boot
鲸落丶孟
这个作者很懒,什么都没留下…
展开
-
MySQL 8.0 在JDBC连接MySql时报错:You must configure either the server or JDBC driver (via the ······
在配置文件中,末尾增加参数:serverTimezone=UTC spring.datasource.url=jdbc:mysql://localhost:3306/lalala?characterEncoding=UTF-8&serverTimezone=UTC UTC 是统一标准世界时间 参考文章: https://blog.csdn.net/weixin_43225235/article/details/105889169 ...原创 2020-08-31 21:41:53 · 205 阅读 · 0 评论 -
Spring Boot如何实现过滤器、拦截器与切片?
对于SpringMvc,可以通过在web.xml中注册过滤器。但在SpringBoot中不存在web.xml,此时如果引用的某个jar包中的过滤器,且这个过滤器在实现时没有使用@Component标识为Spring Bean,则这个过滤器将不会生效。 此时需要通过java代码去注册这个过滤器。以上面定义的TimeFilter为例,当去掉类注解@Component时,注册方式为: @Configur...转载 2020-03-03 15:03:39 · 218 阅读 · 0 评论