
BUG
哥斯拉不会说话
无穷无尽的知识之海。
展开
-
SpringBoot+Mybatis使用Redis作为二级缓存实现与解决删除/修改/新增无法更新缓存【调用clear()方法】的问题。
@TOC一. 搭建环境配置Maven。SpringBoot整合Redis。SpringBoot整合Mybatis。父pom.xml文件如下:<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:sch原创 2021-12-08 16:01:01 · 1523 阅读 · 1 评论 -
BUG:git报错remote: Access denied 拒绝访问 fatal: unable to access ‘ https:/ /gitee. cohe requested URL 40
git将本地仓库同步到远程仓库push代码时报如下错误:remote: Access denied 拒绝访问 fatal: unable to access ‘ https:/ /gitee. cohe requested URL 403window系统内的存的windows凭据不对。进入 控制面版 =》 用户账户 =》 凭据管理器 选中windows凭据,找到gitee点击删除。...原创 2021-11-01 16:52:09 · 7855 阅读 · 1 评论 -
BUG:Git报错fatal: refusing to merge unrelated histories...
将本地仓库同步到远程Gitee仓库时,出现fatal: refusing to merge unrelated histories.. 错误。改错误主要是远端仓库与本地仓库commit记录不一致导致的。(gitee仓库自动添加了LENCENCE,README.md等文件。)1.将gitee仓库清空,再进行上传。2.如仓库中有重要代码则可尝试使用如下指令:git pull origin master --allow-unrelated-histories ...原创 2021-11-01 16:46:21 · 159 阅读 · 0 评论 -
BUG:解决Docker配置Nacos的MySql持久化报错 nacos | Caused by: java.lang.IllegalStateException: No DataSource set
使用Docker配置Nacos的MySql持久化的时候报如下错误:nacos | Caused by: java.lang.IllegalStateException: No DataSource setnacos.env文件如下:PREFER_HOST_MODE=hostnameMODE=standaloneSPRING_DATASOURCE_PLATFORM=mysqlMYSQL_SERVICE_HOST=mysqlMYSQL_SERVICE_PORT=3306MYSQL_SERVIC原创 2021-11-01 11:13:39 · 10071 阅读 · 1 评论 -
BUG:可能出现log4j:WARN Please initialize the log4j system properly的另一种情况
BUG: 在导入别人的项目启动时可能会遇到log4j:WARN Please initialize the log4j system properly问题。这时候很奇怪明明别人博客上的注意点都没错,log4j.properties文件也存在,为什么还是会报这个错呢。总不能直接把log4j.jar包直接删除吧。这里提出有别于其它博客的另一个注意点: 即下图所示这里配置的是资源的查找路径,检查根据这里的路径是否正确找到log4j.properties。...原创 2021-04-21 10:26:55 · 322 阅读 · 0 评论 -
BUG:正则表达式编译时报Error:(343, 68) java: 非法转义符
BUG:今天在公司重启项目之后出现Error:(343, 68) java: 非法转义符报错的项目是正则表达式:String regex = "[`~!@#$%^&*()\\+\\=\\{}|\"?><【】\\/r\\/n]";项目无法启动。回想之前我做对报错文件作过的操作只有把文件的编码格式从gbk改为utf-8.我想是不是这里报错了。把文件的编码格式改回原来的gbk,成功运行。解决方案: 将文件的编码格式改成原始的编码格式。...原创 2021-04-19 11:32:55 · 1130 阅读 · 0 评论 -
BUG:解决执行firewall-cmd 命令后centos出现activation of network connection fail问题
问题背景(先了解清楚):开发环境是centos7.6、VMware15.0。之前在虚拟机上配置了静态ip、安装了jdk1.8等(其它无关这个问题的配置就不列举出来了)。安装nginx时需要打开防火墙端口,运行firewall-cmd --add-port=80/tcp --permanent重启之后之后出现(执行命令之后不会马上出现)问题成因:看过很多博客,自己也回退很多快照,发现问题出现在静态ip这块。(详细原因希望有大佬在评论区解释)解决方法:把网络配置文件恢复成最开始的动态ip配原创 2021-04-03 09:24:59 · 1097 阅读 · 0 评论 -
BUG:yaml配置向Map<String, List<Pet>> allPets注入参数时报错
错误信息:Description:Binding to target [Bindable@29526c22 type = java.util.List<com.atguigu.boot.bean.Pet>, value = 'none', annotations = array<Annotation>[[empty]]] failed: Property: test.data.key1[0].name Value: name1 Origin: clas原创 2021-03-04 20:02:39 · 566 阅读 · 2 评论 -
BUG:SpringBoot在添加静态资源访问前缀之后index.html(欢迎页)无法访问
BUG描述: 一般我们在SpringBoot项目开发中都会在配置文件中添加静态资源访问前缀,比如:spring: mvc: static-path-pattern: /res/**#SpringBoot 4.3SpringBoot一种配置欢迎页的方法是在静态资源路径下新建index.html。//官方文档Spring Boot supports both static and templated welcome pages. It first looks for an index.原创 2021-03-04 09:49:03 · 2577 阅读 · 6 评论 -
BUG:idea的SpringBoot项目中,application.properties文件图标不是小绿叶
BUG描述: 使用在idea中使用Spring Initializer创建一个SpringBoot项目application.properties不是一个小绿叶:我的解决步骤: 刚开始我的.properties是一个这样的的图标,我找到setting > Editor > File Types中的[Text文件]选项下将*.properties选项去掉。在[Properties文件]选项下添加上 *.properties,图标恢复正常.properties文件图标File > Pr原创 2021-03-03 17:42:43 · 3277 阅读 · 1 评论 -
BUG:新建SpringBoot项目运行时,页面报错Whitelabel Error Page This application has no explicit mapping for...
解决方案: 这个BUG主要是SpringBoot启动类与controller不在同一个包下,把启动类与controller包放在同一个目录下即可。BUG:原创 2021-03-03 10:34:03 · 2068 阅读 · 0 评论 -
BUG:用IDEA创建springboot项目的时候报错Plugin ‘org.springframework.boot:spring-boot-maven-plugin:‘ not found
解决方案:清除idea缓存Idea --> File --> Invalidate Caches / Restart...原创 2021-03-02 17:23:16 · 508 阅读 · 0 评论 -
BUG:sublime Text 3 中文文字显示正常,但是中文符号乱码
BUG描述:sublime Text 3 中文文字显示正常,但是中文符号乱码。解决方法:进入sublime,打开首选选项,点击设置,进入如下界面[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-mzfCLu4s-1612536133639)(files:\D:\temp\1.png)]...原创 2021-02-07 11:07:05 · 709 阅读 · 0 评论 -
BUG:java.lang.AbstractMethodError: Method com/mchange/v2/c3p0/impl/NewProxyResultSet.isClosed()Z is
BUG描述:Maven导入c3p0运行项目时idea出现如下报错java.lang.AbstractMethodError: Method com/mchange/v2/c3p0/impl/NewProxyResultSet.isClosed()Z is abstractmaven依赖导入如下:<!-- https://mvnrepository.com/artifact/c3p0/c3p0 --><dependency> <groupId>c3p0&l原创 2021-01-24 12:28:31 · 276 阅读 · 0 评论 -
BUG:FastJson将输出时间转换为时间戳
问题描述:使用FastJson以Json字符串字符串形式返回,无法返回时间戳。解决方案:JSON.toJSONStringWithDateFormat(Object,dateformat,SerializerFeature.WriteDateUseDateFormat)原创 2021-01-23 15:06:29 · 606 阅读 · 0 评论 -
BUG:编译器报错com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException
问题描述: 在xml文件中加入中文注释,编译器报以下错误Caused by: com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: 3 字节的 UTF-8 序列的字节 3 无效。 解决方案:在pom文件中加入下面代码 <properties> <project.build.sourceEncoding>UTF8</project.build.sourceEnc原创 2021-01-21 14:41:17 · 343 阅读 · 0 评论 -
BUG:Maven项目中无法找到xml以及properties等配置文件
BUG描述:项目中的 classes 生成文件(target 或 out)中无法找到项目里的 **.xml 或 **.properties 等配置文件,这些配置文件没有被编译。BUG成因:Maven 通常会忽略掉未标记为 Sources 的文件夹中的配置文件。MyBaties有以下报错:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.zhao.mapper.UserMapp.原创 2021-01-21 08:44:39 · 458 阅读 · 0 评论