BUG笔记
文章平均质量分 64
三分恶
只能当个全栈维持生活。
展开
-
解决了一个小问题——读源码真的只是为了应付面试
一个小bug,引发对日常学习的感想。原创 2021-08-02 13:03:59 · 601 阅读 · 4 评论 -
Mybatis order by 动态传参出现的一个小bug
crud仔日常crud翻车——MyBatis order by 动态传参: java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0).原创 2021-07-24 18:45:58 · 1824 阅读 · 14 评论 -
MySQL运行SQL:[ERR] 1231 - Variable ‘time_zone‘ can‘t be set to the value of ‘NULL‘
问题MySQL恢复备份数据库,出错:[ERR] 1231 - Variable 'time_zone' can't be set to the value of 'NULL'解决在sql文件中有这样的注释:/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;删掉即可。参考【1】:Error on re-import: #1231 - Variable ‘character_set_client’ can’t be set to the value of ‘原创 2021-01-21 13:48:52 · 2395 阅读 · 1 评论 -
Docker使用OpenJDK镜像导致验证码错误:java.lang.NullPointerException at sun.awt.FontConfiguration.getVersion
Docker使用OpenJDK构建镜像,后台生成验证码出错java.lang.NullPointerException: null原创 2021-01-20 12:30:23 · 2328 阅读 · 0 评论 -
Centos7 Docker容器启动报错:WARNING: IPv4 forwarding is disabled. Networking will not work
问题最近使用Docker容器部署Jar包的时候,数据库一直连不上:2021-01-08 02:59:31.354 ERROR [eate-1123226989] com.alibaba.druid.pool.DruidDataSource 2507 - create connection SQLException, url: jdbc:mysql://***/***?autoReconnect=true&useUnicode=true&allowMultiQueries=true&.原创 2021-01-12 22:17:49 · 1091 阅读 · 0 评论 -
git status 中文乱码
问题使用 git status 命令,发现中文乱码但是其他的命令如提交、查看历史中文是正常显示的。解决通过将Git配置变量 core.quotepath 设置为false,就可以解决中文文件名称在这些Git命令输出中的显示问题。git config --global core.quotepath false这样 git status中文乱码问题就解决了。参考:【1】:Git实用小技巧:git status 中文文件名编码问题解决...原创 2021-01-01 15:07:29 · 989 阅读 · 0 评论 -
Mybatis将String作为日期存入MySQL数据库
错误写一个批量更新的语句,接口里没用实体类,直接传入了Map<String, Object>:update(List<Map<String, Object>> list);在脚本里,更新一个datetime类型的字段,UPDATE demo set time=#{time}结果无法转化,出现错误:org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible解决既原创 2020-12-03 20:48:19 · 2285 阅读 · 0 评论 -
org.yaml.snakeyaml.scanner.ScannerException: while scanning for the next token found character ‘@‘ t
@logging.level@Caused by: org.yaml.snakeyaml.scanner.ScannerException: while scanning for the next token found character '@' that cannot start any token. (Do not use @ for indentation)原创 2020-11-13 13:53:03 · 13380 阅读 · 7 评论 -
“ docker logs -f --tail ”查看日志:“docker logs“ requires exactly 1 argument.
[root@localhost /]# docker logs -f --tail 0b83f42a0efa"docker logs" requires exactly 1 argument.See 'docker logs --help'.Usage: docker logs [OPTIONS] CONTAINERFetch the logs of a containerhttps://www.codegrepper.com/code-examples/c/%22docker+lo.原创 2020-11-10 12:43:22 · 35048 阅读 · 0 评论 -
SpringBoot整合Mybatis-Plus报错:org.springframework.core.NestedIOException
错误SpringBoot整合Mybatis-Plus,报错:Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/baomidou/mybatisplus/spring/boot/starter/MybatisPlusAutoConfiguration.原创 2020-11-01 21:44:22 · 3836 阅读 · 2 评论 -
java.lang.UnsatisfiedLinkError: C:\Users\Administrator\AppData\Local\Temp\alglib.dll
一、问题最近在做一个和第三方系统对接的需求。需要对入参进行对称加密。第三方提供了一个jar包,单元测试其中的加密方法时报错:java.lang.UnsatisfiedLinkError: C:\Users\Administrator\AppData\Local\Temp\alglib7079975575154469256.dll: Can't find dependent libraries at java.lang.ClassLoader$NativeLibrary.load(Native Me.原创 2020-10-28 20:20:46 · 4420 阅读 · 1 评论 -
SpringBoot项目连接Redis:ERR Client sent AUTH, but no password is set
问题SpringBoot项目链接Redis报错:Caused by: redis.clients.jedis.exceptions.JedisDataException: ERR Client sent AUTH, but no password is set at redis.clients.jedis.Protocol.processError(Protocol.java:127) at redis.clients.jedis.Protocol.process(Protocol.java:161原创 2020-10-20 21:02:56 · 3775 阅读 · 1 评论 -
Proxy error: Could not proxy request
VUE项目启动后,登录,发现报错:Proxy error: Could not proxy request /user/login from localhost:8089 to http://***。**。**:8081/.See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ENOTFOUND).报错很明显,代理不过去,需要修改代理配置:找到vue.config.js .原创 2020-10-16 17:45:34 · 59170 阅读 · 6 评论 -
Idea 连接数据库出错Connection to xxx@localhost failed. [08001] Could not create connection to database
问题使用Idea自带的Database工具连接MySQL数据库出错:Connection to aplanmis@localhost failed.[08001] Could not create connection to database server. Attempted reconnect 3 times. Giving up.原因系统默认的时区与IDEA连接数据库的时区 (MySQL默认时区为UTC) 不一致,按照格林威治的时间,中国属于东八区时间,领先UTC八个小时,所以说存在8.原创 2020-07-16 19:38:25 · 8620 阅读 · 4 评论 -
FTPClient创建目录失败(makeDirectory)
在使用FTPClient创建目录失败: // path="archive\File\upload\2020\06\22" isMakeSucess = ftp.makeDirectory(path);经过查阅资料发现,创建目录方法makeDirectory()不支持创建多级目录,所以需要一级一级地创建目录: /** * ftp创建目录——ftpClient只支持一级一级创建 * @param ftp * @param path * @return .原创 2020-06-22 17:50:24 · 7450 阅读 · 4 评论 -
org.apache.ibatis.binding.BindingException
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter 'startTime' not found. Available parameters are [StartTime, param1]原创 2020-06-03 14:57:56 · 640 阅读 · 0 评论 -
SpringBoot打包之后乱码
问题:正在在做的SpringBoot项目,开发环境是一切OK的,打成war包在Windows系统启动,发现有部分中文乱码。解决办法:在启动命令里加上编码:java -Dfile.encoding=utf-8 -jarOK,启动之后的系统没有乱码了,但是新的问题又来了。问题:DOS窗口中文乱码。解决办法:打开cmd控制台,在命令行输入chcp后回车可以查看到当前的字符编码。如果是乱码的话,这时通常是936,代表的是GBK编码。在命令行输入chcp 65001后回车。65..原创 2020-05-28 10:06:25 · 2931 阅读 · 3 评论 -
java.io.FileNotFoundException: Could not open ServletContext resource [/config.properties]
错误SpringBoot项目,单元测试的时候,报错: java.io.FileNotFoundException: Could not open ServletContext resource [/config.properties]测试代码: @Test public void testGetCreditListByPost(){ String result=creditService.getCreditListByPost("XX公司"); lo.原创 2020-05-13 11:44:11 · 3032 阅读 · 2 评论 -
使用MySQL数据库进行连接查询的时候出现错误 Column 'modifyTime' in where clause is ambiguous
原文作者:qq_23614619 原文链接:https://blog.csdn.net/qq_23614619/article/details/79242142在Mybatis脚本中使用连接查询的时候报错:Column 'MODIFY_TIME' in where clause is ambiguous导致这个错误的原因是因为连接查询的表中有相同名字的列。查询结果...转载 2020-05-07 21:35:24 · 990 阅读 · 0 评论 -
两个原因导致Spring @Autowired注入的组件为空
文章目录译文你手动实例化了一个类你忘记在某个类使用组件注解或者它的扩展注解原文YOU INSTANTIATED THE A CLASS MANUALLYYOU FORGOT TO ANNOTATE A CLASS AS A COMPONENT OR ONE OF ITS DESCENDANTS原文作者:Steve Claridge 原文链接:https://www.moreofless....原创 2020-04-14 22:28:44 · 996 阅读 · 0 评论 -
[Err] 1143 - SELECT command denied to user 'XX'@'%' for column 'XXX' in table 'XX'
今天,用Navicat导入数据库的时候报了这么一个错误:[Err] 1143 - SELECT command denied to user 'XX'@'%' for column 'ORG_ID' in table 'XX'SELECT命令拒绝用户’XX’@’%’。一想,当然会拒绝,因为当前用的不是’XX’账户。快捷起见,不用命令,直接用Navicat新建账户并授权。...原创 2020-01-06 13:24:18 · 3813 阅读 · 0 评论 -
SpringBoot项目提示:Cannot resolve symbol 'RestController'
在pom.xml中添加依赖: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency>...原创 2019-12-09 21:21:21 · 3805 阅读 · 4 评论 -
Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:
错误报错如下:Error querying database. Cause: : com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'temp.a...原创 2019-10-21 10:13:30 · 15140 阅读 · 5 评论 -
java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for
java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for edu.hpu.mapper.ExamsMapper.addExam使用IJ ssm整合的项目报了这么一个错误,更详细错误信息:java.lang.IllegalArgumentException: Mapped...原创 2019-04-14 14:51:46 · 2194 阅读 · 0 评论 -
javax.servlet.ServletException: Circular view path [hello]: would dispatch back to the current handl
javax.servlet.ServletException: Circular view path [hello]: would dispatch back to the current handler URL [/hello] again. Check your ViewResolver setup! (Hint: This may be the result of an unspecifie...原创 2019-04-17 20:09:01 · 4799 阅读 · 0 评论 -
Field roomService in edu.hpu.controller.GuestController required a bean of type 'edu.hpu.service.Roo
Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.2019-05-26 16:54:56.276 ERROR 8516 --- [ restartedMain] o.s.b.d.LoggingFailur...原创 2019-05-26 17:03:46 · 793 阅读 · 0 评论 -
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): edu.hpu.mapper.RoomMapper.findEmptyRoom at org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod...原创 2019-05-26 21:52:49 · 770 阅读 · 0 评论 -
java.util.Date转化为java.sql.Date出现时间错误
在mysql中用到了date类型,对应的java类型就是java.sql.Date,但是java.sql.Date的生成需要对java.util.Date类型进行转换,在转换的过程中发现出现了错误,两边不一致 SimpleDateFormat sdf =new SimpleDateFormat("yyyy-mm-dd"); Date stDate=sdf.parse(...原创 2019-05-29 18:53:18 · 9191 阅读 · 0 评论 -
SpringMVC将对象转化为JSON时406
最近跟着做淘淘商城项目的时候,出了这么一个406错误,这个是Controller中的代码 @RequestMapping("/items/{itemId}") @ResponseBody public TbItem getItemById(@PathVariable long itemId) { TbItem item=itemService.findItemById(itemId);...原创 2019-07-05 17:59:13 · 941 阅读 · 0 评论 -
org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: java.lang.IllegalArgume
用SpringBoot整合Mybatis的时候出了状况。Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.2019-08-15 10:06:57.108 ERROR 12712 --- [ restartedMain]...原创 2019-08-15 20:35:09 · 3225 阅读 · 1 评论 -
Error running 'XXXApplication': Command line is too long. Shorten command line forXXX
在运行一个SpirngBoot项目时发生了一个错误:Error running 'XXXApplication': Command line is too long. Shorten command line forXXXApplication命令行过长,打开 /.idea/workspace.xml 文件, ** Ctrl+F** ,搜索 ** PropertiesComponent *...原创 2019-09-11 21:57:30 · 10010 阅读 · 4 评论 -
MySQL:[Err] 1292 - Incorrect datetime value: ‘0000-00-00 00:00:00‘ for column ‘CREATE_TIME‘ at row 1
[Err] 1292 - Incorrect datetime value: ‘0000-00-00 00:00:00’ for column ‘CREATE_TIME’ at row 1全局当前https://my.oschina.net/shadowolf/blog/3005188原创 2019-09-23 12:41:26 · 51475 阅读 · 4 评论 -
无法启动此程序,因为计算机丢失MSVCP140.dll
https://www.microsoft.com/en-us/download/details.aspx?id=48145原创 2019-09-27 22:50:54 · 33006 阅读 · 0 评论 -
Idea Failed to read artifact descriptor for XXX
idea Failed to read artifact descriptor for net.minidev:json-smart:jar:2.3-SNAPSHOT使用IDEA创建Spring Boot项目时,pom.xml中报了这么一个错误查了一下,原因是网速不好,下载依赖包出错,但idea认为依赖包已下载完成,所以不再下载,但springboot应用找不到jar包,报错。解决办法:删...原创 2019-04-16 18:39:27 · 17504 阅读 · 1 评论