- 博客(13)
- 收藏
- 关注
原创 MySQL5.7 sql_mode=only_full_group_by问题解决办法
由于5.7以上版本默认的 MySQL 配置中 sql_mode 配置了 only_full_group...
2022-09-06 15:20:54
422
原创 MySQL数据库中如何查询分组后每组中的最后一条记录
MySQL数据库中如何查询分组后每组中的最后一条记录方法一select * from messages whereid in ( select max(id) fom messages group by name);-- 优化select b.* from (select max(`id`) as id from `messages` group by `name`) as ajoin `messages` as b on a.id = b.id;方法二sel
2022-03-26 17:06:07
4283
2
原创 mysql 批量 truncate table 指定表数据
执行下面sql语句,将结果集复制出来,然后批量执行就完事了SELECT CONCAT(“truncate table “,a.table_name,”;”) FROM(select table_name from information_schema.tables where table_schema=‘数据库名称’) as a WHERE a.table_name LIKE “aa%”...
2021-10-09 11:35:40
1440
原创 vue axios.get(...).then(...).catch(...).finally is not a function, vue axios不支持finally的解决办法
IE浏览器以及edge浏览器的不支持es6里面promise的finally报错vue axios.get(…).then(…).catch(…).finally is not a function解决方法:借助promise.prototype.finally包npm install promise.prototype.finally -S 最后记得在 main.js 里引入该依赖包:require('promise.prototype.finally').shim();// 之后
2020-11-13 09:48:45
4889
原创 MySQL 用 truncate 命令快速清空一个数据库中的所有表
select CONCAT('truncate table ',table_schema,'.',TABLE_NAME, ';') from INFORMATION_SCHEMA.TABLES where table_schema in ('数据库1','数据库2');或者select CONCAT('truncate table ',TABLE_NAME, ';') from INFORMATION_SCHEMA.TABLES where table_schema in ('数据库1','数据库2')
2020-08-06 16:04:57
710
原创 Springboot2 RestTemplate设置超时时间
Spring boot 版本>=2.0@Configurationpublic class BeanConfig { @Bean public RestTemplate restTemplate() { SimpleClientHttpRequestFactory requestFactory = new SimpleClientHttpRequestFactory(); requestFactory.setConnectTimeout(5000)
2020-05-18 11:24:53
4725
原创 SpringBoot 下载Excel文件,解决文件格式与文件拓展名指定的格式不一致问题
1.前端如果用xlsx格式接收表格 后台用XSSFWorkbook workbook = new XSSFWorkbook();创建工作薄 response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); response.addHeader("Content-Dispo...
2020-04-09 15:50:23
5701
原创 解决从github上拉取代码慢的问题
1.获取Github相关网站的ip访问https://www.ipaddress.com,找到页面中下方的IP Address Tools - Quick Links,分别输入github.global.ssl.fastly.net和github.com,查询ip地址。2.修改本地host文件Mac为例,命令行下输入:sudo vi /etc/host,然后输入电脑的密码,打开host文件。...
2018-12-10 22:36:21
21484
12
原创 linux 设置开机启动项
1.chkconfig2.修改/etc/rc.local脚本#!/bin/sh## This script will be executed *after* all the other init scripts.# You can put your own initialization stuff in here if you don't# want to do the full Sy...
2018-11-24 23:44:48
1160
原创 markdown中实现首行缩进
方法一:直接写半方大的空白   或  全方大的空白   或  不断行的空白格   或  方法二:全角输入情况下双击两次空格这个方法我遇到一个问题:首段不能缩进!...
2018-11-24 23:01:31
1380
原创 Linux 64bit Could not initialize class java.awt.image.BufferedImage image.createGraphics(); 卡住不动
问题描述:1、64位linux报错Could not initialize class java.awt.image.BufferedImage,报错如下:javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class java.awt.image.BufferedImage...
2018-11-24 22:48:57
1460
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人