摘要: 背景:使用spring提供的 ResponseEntity 和Resource结合,实现的下载文件功能 bug:Resource已经加载到了文件, 并且通过 ResponseEntity 构建了响应,但是页面接收不到文件。 原因:目前初步发现是因为我使用的捕获异常的切面导致的,具体切面怎么会导致 响 阅读全文
posted @ 2019-12-23 17:57 聪明的娃 阅读(741) 评论(0) 推荐(0) 编辑
摘要: //初始化//注意:我这里是时间范围选择,所以定义了range属性。var timeScope = laydate.render({ elem: '#time_scope', range: '~', done: function (value, date, endDate) { } }); timeScope 为laydate.render返回的对象,而 timeScope的config属性存储了 阅读全文
posted @ 2019-11-29 16:08 聪明的娃 阅读(15153) 评论(0) 推荐(0) 编辑
摘要: 自从那天灵感突现,搜了下MySQL存储过程的实现,我就再也不会为造测试数据这种事情烦恼了,存储过程用起来简直太方便了。 阅读全文
posted @ 2019-06-12 14:13 聪明的娃 阅读(239) 评论(0) 推荐(0) 编辑
摘要: css选择器选择第n个子元素,共有两种写法: .parent span:nth-child(n) 选择parent下的第n个子元素(不管前边是不是span,都算在内) .parent span:nth-of-type(n) 选择parent下的第n个span元素(强调只对span标签计数) .par 阅读全文
posted @ 2019-03-13 16:31 聪明的娃 阅读(6263) 评论(0) 推荐(0) 编辑
摘要: 在拦截器中添加以下逻辑 页面ajax配置全局函数: 阅读全文
posted @ 2019-02-28 17:40 聪明的娃 阅读(79) 评论(0) 推荐(0) 编辑
摘要: 在拦截器中添加以下逻辑 页面ajax配置全局函数: 阅读全文
posted @ 2019-02-28 17:40 聪明的娃 阅读(568) 评论(0) 推荐(0) 编辑
摘要: 参考大佬的文章 https://juejin.im/entry/5ab304dd51882555825241b3 阅读全文
posted @ 2019-02-24 18:30 聪明的娃 阅读(1846) 评论(0) 推荐(0) 编辑
摘要: 参考这位大佬的帖子:https://www.jianshu.com/p/5d8e77ef7f84 阅读全文
posted @ 2019-02-22 10:12 聪明的娃 阅读(1333) 评论(0) 推荐(0) 编辑
摘要: * 首先要确保你的表和想要关联的表有外键连接 repository中添加接口JpaSpecificationExecutor<?>,就可以使用springboot jpa 提供的API了。 @Repository public interface MyEntityRepository extends 阅读全文
posted @ 2019-02-15 12:09 聪明的娃 阅读(9409) 评论(5) 推荐(0) 编辑
摘要: 1、错误场景: springboot项目中在.properties文件(.yml)文件中配置了属性值,在Bean中使用@Value注解引入该属性,Bean的构造器中使用该属性进行初始化,此时有可能会出现属性值为null,造成初始化程序的错误 2、错误原因: 因为Bean的构造器调用是在@Value属 阅读全文
posted @ 2019-02-13 18:22 聪明的娃 阅读(15464) 评论(0) 推荐(1) 编辑