![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
常见错误解决
学习中遇见的错误解决方法
无痕YF
这个作者很懒,什么都没留下…
展开
-
报错:Expression #1 of SELECT list is not in GROUP BY .......with sql_mode=only_full_group_by
报错:Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘hospital.d.rugstoreId’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by 解决方案: 在MySQL执行下列语句原创 2021-06-03 16:06:55 · 153 阅读 · 2 评论 -
MyBatis中#{}和${}的区别
MyBatis中#{}和${}的区别 含义: #{}:为占位符 ${}:为拼接符 区别: 用法 #{}:为参数占位符?,即sql预编译 ${}为字符串替换, 即字符串拼接 执行流程 #{}:动态解析 --> 预编译 --> 运行 ${}: 动态解析 --> 编译 -->运行 变量替换 #{}:变量替换是在DBMS(数据库管理系统)中,会对对应的变量自动加上 ${}:变量替换实在DBMS外,不会对对应的变量加上 sql注入 #{}可以防止sq原创 2021-05-13 17:40:59 · 105 阅读 · 1 评论 -
Log4j 启动出现 WARN Unsupported encoding和Failed to load class “org.slf4j.impl.StaticLoggerBinder“.
Log4j 启动出现 WARN Unsupported encoding Log4j配置中有空格或其他字符,查看配置文件并根据idea提示解决 SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”. log4j版本错误或冲突原创 2021-05-13 17:35:24 · 105 阅读 · 0 评论 -
编译时找不到javax.annotation.meta.When的类文件
编译时找不到javax.annotation.meta.When的类文件 <!--原因: 找不到javax.annotation.meta.When的类文件--> <dependency> <groupId>com.google.code.findbugs</groupId> <artifactId>annotations</artifactId> <version>3.0.1</version原创 2021-05-13 17:32:11 · 3886 阅读 · 0 评论 -
找不到mapper文件未编译
找不到mapper文件未编译 学SSM时遇到 <!--加入依赖后重新部署--> <resources> <resource> <directory>src/main/java</directory> <includes> <include>**/*.xml</include> </includes> </resource>原创 2021-05-13 17:29:15 · 138 阅读 · 0 评论 -
端口被占用处理方法
端口被占用处理方法 cmd中输入: netstat -aon|findstr 1099(端口号) 得到占用的程序,结束它 taskkill -f -pid 3746(3746占用的程序)原创 2021-05-13 17:20:26 · 76 阅读 · 0 评论 -
Date格式转换
Date格式转换乱码解决 1、Java对象转json错误;pojo属性上面加注解 import com.fasterxml.jackson.annotation.JsonFormat; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") 2、form表单时间格式化 import org.springframework.format.annotation.DateTimeFormat; @DateTimeFormat(pattern = "yyyy-MM-dd HH:m原创 2021-04-30 09:25:52 · 80 阅读 · 0 评论