随笔分类 -  springboot

springboot+vue导出本地可执行文件
摘要:1、前端页面增加下载链接 <a href="http://localhost:80/system/download" download="xxx.exe">下载地址</a> 2、后端读取文件下载 //下载文件 @GetMapping("/system/download") public void d 阅读全文

posted @ 2023-09-15 18:25 七七2020 阅读(98) 评论(0) 推荐(0)

springboot集成Thumbnailator压缩图片
摘要:一、参考大神博客 1、https://blog.51cto.com/u_11269274/5118649 2、https://blog.csdn.net/weixin_44722978/article/details/111166154 二、引用 <!-- 图片缩略图 --> <dependency 阅读全文

posted @ 2022-07-01 09:45 七七2020 阅读(625) 评论(0) 推荐(0)

springboot 集成poi导出word(一)
摘要:使用ruoyi-前后端分离版本,根据word模板导出,包含表格和图片。 一、创建模板 列表使用{{}},文本使用[] 二、引入依赖 <!-- excel工具 --> <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-ooxm 阅读全文

posted @ 2022-06-15 17:29 七七2020 阅读(2278) 评论(0) 推荐(1)

springboot集成itext根据模板导出PDF
摘要:项目需要根据一个已知的模板文档,取数据然后填充空格。 先制作word版模板,然后另存为pdf格式,转换后使用Adobe Acrobat Pro添加域,生成PDF模板。 利用itext读取模板,填充数据,下载导出。 参考大神链接:https://blog.csdn.net/tyc_054600/art 阅读全文

posted @ 2020-05-09 08:40 七七2020 阅读(7634) 评论(3) 推荐(0)

Maven打包报错:[WARNING] The POM for xxx is missing, no dependency inform
摘要:idea 右侧菜单Maven->父模块(Lifecycle)install->待生成模块(Lifecycle)package 参考链接:https://blog.csdn.net/cccmercy/article/details/82818111 阅读全文

posted @ 2020-04-07 11:24 七七2020 阅读(1422) 评论(0) 推荐(0)

ajax请求发送json数据
摘要:前端代码 function submitHandler() { var data3 = { "enCode": 100, "enName": "2123", "flueNum": 2, "pipes": [ { "name": "123" }, { "name": "124" }] }; var d 阅读全文

posted @ 2020-03-10 10:07 七七2020 阅读(3217) 评论(0) 推荐(0)

springboot报错:expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
摘要:springboot Controller中引用 @Autowired private IXxxService xxxService; 报错;expected at least 1 bean which qualifies as autowire candidate. Dependency anno 阅读全文

posted @ 2019-12-16 10:31 七七2020 阅读(7301) 评论(0) 推荐(1)

spring-boot swagger2 设置全局token,说明页面接口无法带入token
摘要:1、swagger配置类 // 验证 private List<ApiKey> securitySchemes() { List<ApiKey> apiKeyList = new ArrayList(); apiKeyList.add(new ApiKey("token", "token", "he 阅读全文

posted @ 2019-12-10 13:40 七七2020 阅读(5310) 评论(0) 推荐(0)

springboot使用freemaker导出word文档
摘要:1、Controller /** * 下载协议到word模板 */ @GetMapping("/downloadtest") public void downloadtest(Test test, HttpServletRequest request, HttpServletResponse res 阅读全文

posted @ 2019-11-15 17:13 七七2020 阅读(3937) 评论(0) 推荐(0)

idea maven的pom文件已导入依赖,但是无法引入该包中class
摘要:现象:pom 文件中引入其他module依赖 在controller中无法引入该module的class 解决办法:在添加新的依赖后,工程右击--Maven--Reimport 参考链接:https://blog.csdn.net/qq_35181209/article/details/807403 阅读全文

posted @ 2019-10-10 10:55 七七2020 阅读(10419) 评论(0) 推荐(1)

springboot导出文件名称乱码
摘要:这样修改后,除了火狐浏览器之外其他浏览器都正常。 文件上传下载编写:参考https://www.jianshu.com/p/85017f5ecba1 阅读全文

posted @ 2019-09-27 16:34 七七2020 阅读(3986) 评论(1) 推荐(1)

springboot彩色日志输出乱码
摘要:配置彩色日志输出,总是输出 结果控制台输出字符乱码。 解决办法:安装 AnsiConsole 插件 在Help->EclipseMarketplace->find AnsiConsole,安装即可。 效果图: 参考大神博客:https://blog.csdn.net/hzh_csdn/article 阅读全文

posted @ 2019-09-07 10:10 七七2020 阅读(1742) 评论(0) 推荐(0)

js跳转页面
摘要://跳转去另一页面 function goToOtherWeb(mn){ var url = prefix + "/otherweb/" + mn+ ""; window.location.href = url; } //springboot后台获取 @GetMapping("/otherweb/{mn}") public String otherweb(@PathVariable("mn") S 阅读全文

posted @ 2019-08-26 14:29 七七2020 阅读(309) 评论(0) 推荐(0)

springboot多数据源时取不同库中相同表结构的数据并分页显示
摘要:配置好多数据源后,之前取数是调用多个mapper,每个mapper中配置注解切换数据源。发现这样能够查询出来,但是表格分页展示时由于每次翻页重新请求数据库,导致翻页数据错误。 最后发现可以在主库中利用视图获取多个库的数据,之后调用主库中的mapper取得主库中视图数据,分页也正确。 数据库语句: 阅读全文

posted @ 2019-07-30 09:07 七七2020 阅读(1023) 评论(0) 推荐(0)

导航