excelize清空excel内容 使用Go1.21.0版本的朋友注意了,在使用这个excel库"github.com/xuri/excelize/v2"时候,f.Save(),f.SaveAs(),会导致清空excel的内容和格式。换了GO1.17.1之后,就没有问题了。
mysql5.7.30忘记root密码 windows系统安装了mysql5.7.30,在使用navicat链接mysql时候,提示。执行完上面的命令后,就改掉了mysql的root角色的密码了。打开任务管理器的服务,查看有没有MYSQL服务。如果没有,则按照下面的csdn博客进行操作。navicat 重新连接mysql。
request.getInputStream()只能被读取一次 但是问题是:我们都知道 request.getInputStream()只能被执行一次读取请求参数,下次再执行一次就会获得null。RequestLogInterceptor中实现preHandle()方法,然后在该方法内读取请求参数。在spring boot中,我们很容易就想到要用Interceptor拦截器去做拦截HttpServletRequest请求。RequestWrapperFilter.java代码如下。用RequestWrapperFilter。
springboot+七牛云对象存储实现文件上传 1,首先得有存储空间2,然后查看CDN加速域名3,查看Access/Secret Key导入七牛云的JDK <dependency> <groupId>com.qiniu</groupId> <artifactId>qiniu-java-sdk</artifactId> <version>[7.7.0,7.7.99]</version> </d
mybatis-plus查询表的时候有些字段为空 亲测,已经解决。yaml:mybatis: mapper-locations: classpath:mapper/*.xml# config-location: classpath:mybatis/mybatis-config.xml configuration: map-underscore-to-camel-case: true #开启驼峰命名模式商品ID和品牌ID都是为空。因为我在Product、和Pro
项目的swagger-ui页面访问不到 场景:springboot2.5.6项目,导入了springfox-boot-starter即swagger3.0的依赖.配置了LoginInteceptor。ERROR:原因:拦截器拦截了swagger-ui的资源请求解决办法:.excludePathPatterns添加swagger-ui的资源请求路径 @Override public void addInterceptors(InterceptorRegistry registry) { registry.ad
使用log4j2出现bug:Class path contains multiple SLF4J bindings. 场景:使用slf4j+log4j2做日志bug描述:存在多个日志实现SLF4J: Class path contains multiple SLF4J bindings.SLF4J: Found binding in [jar:file:/E:/space/MavenRepository/maven_jar/ch/qos/logback/logback-classic/1.2.10/logback-classic-1.2.10.jar!/org/slf4j/impl/StaticLoggerBinde
未经过token验证的用户A使用正常用户登录后的有效token访问A自己的资源 用户ID和token:已经登陆的用户:{ "status": 200, "msg": "登录成功!", "data": { "userId": "83c68099-6522-4d22-a841-7059089c18cd", "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6Ijgz YzY4MDk5LTY1MjItNGQyMi1hODQxLTcwNTkwODljMThjZCIsInR5
Required request parameter ‘userId‘ for method parameter type String is not present postman:发送Http请求springboot控制台打印Exception:Required request parameter ‘userId’ for method parameter type String is not present解决问题方法之一:127.0.0.1:8080/user/info?userId = 899-4d2841-89c18cd看一下参数之间是不是写了空格, userId(空格)=(空格)xxxxxx...
出现 Data truncated for column ‘date‘ at row 1 的错误解决方案 出现 Data truncated for column ‘date’ at row 1 的错误解决方案数据库中的user表字段 id ,原本设置的数据类型是int 11位;但是由于项目需要,在spring boot中的Service层处理id是 将其赋值为UUID.randomUUID().toString();导致类型对不上,重新设计数据库将id设为varchar数据类型即可...
IDEA使用Maven中Lifecycle的clean,package对SpringBoot项目打jar包出错 IDEA使用Maven中Lifecycle的clean,package对SpringBoot项目打jar包出错报错信息如下:maven package Non-parseable settings “E:\xxxxx\setting.xml”原因分析:setting.xml中格式出现问题,大概率是注释<!-- -->没有弄好,所以检查格式有没有错误,特别是 “<-- ” “–>” 这些东西有没有多余,位置对不对。所以修改setting.xml文件之前,最好先备份
select-from-where的查询结构可以起别名 select-from-where查询块可以起别名吗可以,因为sql是结构化查询语言,select-from-where查询出来的结果就是结构化的,算是一张表。 一张表当然可以起别名了eg: 哪些人的薪水在部门平均薪水之上select e1.ename,e1.sal,e1.deptnofrom emp e1,(select deptno,avg(sal) avgSal from emp group by deptno) e2where e1.sal >= e2.avgSal and e1.d