错误
小白程序猿一枚
专注于后端开发
展开
-
Navicat运行sql文件出现 [ERR] 1273 - Unknown collation: ‘utf8mb4_0900_ai_ci‘ 错误原因
使用navicate12运行sql文件出错报错:[ERR] 1273 - Unknown collation: 'utf8mb4_0900_ai_ci'1报错原因:生成转储文件的数据库版本为8.0.22,要导入sql文件的数据库版本为5.6.5,因为是高版本导入到低版本,引起1273错误解决方法:打开sql文件,将文件中的所有utf8mb4_0900_ai_ci替换为utf8_general_ciutf8mb4替换为utf8保存后再次运行sql文件,运行成功...原创 2020-12-16 10:49:36 · 2977 阅读 · 3 评论 -
Loading class `com.mysql.jdbc.Driver‘. This is deprecated. The new driver class is`com.mysql.cj.jdbc
Loading class `com.mysql.jdbc.Driver’. This is deprecated. The new driver class is com.mysql.cj.jdbc.Driver其实这个就是你的MySQL数据库的驱动太高了。解决方案,在你的程序中找到你加载MySQL驱动的那一条语句,如下String drive = "com.mysql.jdbc.Driver";把他改成就可以了String drive = "com.mysql.cj.jdbc.Driver";原创 2020-12-16 17:42:41 · 2532 阅读 · 0 评论 -
无法在web.xml或使用此应用程序部署的jar文件中解析绝对uri:[http://java.sun.com/jsp/jstl/core]
错误的原因就是:没有办法找到jstl标签库解决的办法:首先看一下你是否导入了jstl.jar和standrad.jar如果没有可以去maven官网找一下然后在pom.xml中把依赖导进去。如果有,那就更好办了,直接把standard.jar里边的.tld全部复制到webapp下的WEB-INF里边就可以了。...原创 2021-07-20 11:24:30 · 143 阅读 · 2 评论 -
java.net.ConnectException: Connection refused: connect.
早上在用IDEA连接数据库的时候突然报了一个这个错经过努力终于找到了。原来是数据库没有开启而导致的。【我裂开】解决方法:打开任务管理器->服务,找到mysql右键启动就可以了。当然这只是我遇到这个错误是这个原因,如果有其它的原因,欢迎大家留言。...原创 2021-07-20 11:41:06 · 1089 阅读 · 0 评论 -
java.sql.SQLException: Access denied for user ‘‘@‘localhost‘ (using password: YES)
错误原因:找不到数据库的同户名解决办法:查看你链接数据库的配置文件,看里边的的信息是否正确。原创 2021-07-24 15:01:41 · 150 阅读 · 0 评论 -
java.sql.SQLException: The server time zone value ‘?й???????‘
错误原因:MySQL时区出错了解决办法:在你连接数据的url后边加上serverTimezone=GMT%2B8就完美解决了serverTimezone=GMT%2B8原创 2021-07-24 15:06:27 · 72 阅读 · 0 评论 -
java.lang.ClassNotFoundException: com.mysql.cj.jdbc.Driver
显示mysql驱动有问题,首先确定mysql驱动没有写错,在写驱动时不能加双引号、空格、分号,正确的写法如下:driver=com.mysql.cj.jdbc.Driverurl=jdbc:mysql://127.0.0.1:3306/smbms?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8username=rootpassword=123456这里写对了还有可能出现这个错,原因是tomcat的里边也.原创 2021-07-24 15:20:18 · 1063 阅读 · 0 评论 -
java.io.IOException: Could not find resource db.properties
具体错误java.lang.ExceptionInInitializerError at MyTest.TestStuSelect(MyTest.java:12) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.Delegating原创 2021-08-11 16:38:42 · 3388 阅读 · 1 评论 -
(本人亲测有效)关于IDEA中 Tomcat 控制台打印日志中文乱码的解决
转载自:https://www.cnblogs.com/yanglichen/p/11435628.html在 Idea 上面使用 Tomcat 时,发现控制台打印信息的时候,出行中文乱码问题;可以通过以下几种解决办法1:在-Dfile.encoding=UTF-8 在vm中设置编码方式2.然后从File->Setting ,设置File Encodings ,检查Default Encodings 是否是UTF-8.3.重启idea.如果乱码还没有解决,继续试试下面的方法修改IDEA转载 2021-11-01 11:17:20 · 326 阅读 · 0 评论 -
IDEA安装Vue.js后new没有 Vue Component
首先确定自己安装了vue.js这个插件,这个很重要!!!这个完成后如果还没有,就看一下小编的解决方案吧!!!首先进到这里 file-setting-Editor-File and Code Templates然后我们在new一下就会发现有了,这样就成功了...原创 2021-11-20 15:19:55 · 238 阅读 · 0 评论 -
官网下载的SpingBoot项目启动失败解决方案
先看一下错误原因是少了web支持,只需要添加web的依赖就可以了解决方案:在pom.xml文件中导入下边的依赖<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId></dependency>...原创 2021-11-28 16:02:45 · 1107 阅读 · 0 评论 -
java.lang.Exception: Method contextLoads() should be public
错误信息原因:这是因为Junit4要求测试的方法为public且返回值为void解决方案:给测试类加上public就可以了原创 2021-12-08 16:54:48 · 3411 阅读 · 0 评论 -
Field error in object ‘employee‘ on field ‘emBirth‘: rejected value [yyyy-MM-dd];
错误:原因:使用springboot的日期格式出错误解决方案:在springboot的配置文件中添加spring.mvc.date-format=yyyy-mm-dd设置日期格式原创 2021-12-09 09:56:25 · 625 阅读 · 0 评论 -
SpringBoot测试jdbc时dataSource.getClass()出现空指针异常
问题:DataSource自动注入为空测试代码package com.zkw;import org.junit.Test;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.boot.test.context.SpringBootTest;import org.springframework.test.context.junit4.SpringRunner;.原创 2021-12-12 16:40:18 · 1759 阅读 · 1 评论 -
SpringBoot整合JDBC Access denied for user ‘‘@‘localhost‘ (using password: NO)
错误如下原因:在SpringBoot的配置文件中的password和username,使用了idea提供的data-password和data-username,从而导致了错误解决方案:把配置文件中的data-password改成password,data-username改成username就可以了.正确的配置文件:....原创 2021-12-12 16:53:34 · 291 阅读 · 0 评论 -
jdbcTemplate 中的queryForList的大坑
jdbcTemplate 中的queryForList,你真的懂吗?你想象中的queryForList是不是应该长成下面这种模样?String sql = "select * from test.user";List<User> userList = jdbcTemplate.queryForList(sql,User.class);然后,很激动的点了run程序跑出来一个,然后痛苦面具????????????????????,不是list吗?为什么expected是1?我总共5条原创 2021-12-13 16:14:31 · 506 阅读 · 0 评论 -
如何把List<Map<String,Object>>的数据显示在前端
首先导入allibaba的fastJson<dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>1.1.46.sec01</version></dependency>我的想法是先把List<Map<String,Object>>的数据转换成原创 2021-12-14 15:22:08 · 938 阅读 · 0 评论 -
SpringBoot 2.0 报错: Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedde
错误信息产生原因: Mybatis没有找到合适的加载类,其实是大部分spring - datasource - url没有加载成功 DataSourceAutoConfiguration会自动加载.解决方案: 在springboot的主入口加上这个@SpringBootApplication(exclude= {DataSourceAutoConfiguration.class})没有配置spring - datasource - url 属性…spring - datasourc原创 2022-02-10 16:29:56 · 151 阅读 · 0 评论 -
数据库错误1166 - Incorrect column name ‘字段名 ‘
【代码】数据库错误1166 - Incorrect column name ‘字段名 ‘原创 2023-04-30 18:35:47 · 1543 阅读 · 1 评论