个人总结
Destiny..
这个作者很懒,什么都没留下…
展开
-
BeanUtil.copyProperties数据拷贝处理列表数据分页总条数total错误
BeanUtil.copyProperties数据拷贝处理列表数据分页总条数total错误在查询列表时候对列表list进行了数据拷贝导致分页总条数total失效:解决办法,在业务层拷贝后将拷贝得到的集合set到pageinfo中即可原创 2021-11-09 17:00:51 · 519 阅读 · 0 评论 -
**excel模板下载工具类**
excel模板下载工具类public static void dowlondTemplate(HttpServletResponse response,String fileName){try {org.springframework.core.io.Resource resource = new ClassPathResource(fileName);File file = resource.getFile();String filename = resource.getFilename();原创 2020-09-18 15:03:07 · 147 阅读 · 0 评论 -
springboot多文件上传
在controller传入 HttpServletRequest request,自定义一个path,例如:String path=“F:/file/”;原创 2019-07-23 11:41:47 · 100 阅读 · 1 评论 -
springboot整合pagehelper分页插件
首先在application.properties中添加配置pom 具体的使用方法我是在controller中使用的,具体代码如下原创 2019-07-23 11:52:34 · 141 阅读 · 0 评论 -
获取springboot项目根路径
获取springboot项目根路径// 获取项目根路径final File basePath = new File(ResourceUtils.getURL(“classpath:”).getPath());这个再Windows下是可以的,但是在Linux (centos7)下是不行的,正确的获取方法:Resource resource = new ClassPathResource(""...转载 2019-09-26 17:20:35 · 3975 阅读 · 0 评论