![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
java开发
文章平均质量分 53
高德飞
从事物流仓储的软件开发
展开
-
for循环中调用CloseableHttpClient代码未执行完毕就自动停止
for循环的某次请求调用高德地图API发生了401错误,而这个http请求一直不关闭,导致for循环就一直卡在这里不继续执行原创 2024-03-04 22:00:16 · 190 阅读 · 0 评论 -
for update防止修改丢失但不起作用的解决办法
for update防止修改丢失但不起作用的解决办法原创 2023-06-10 15:29:03 · 1212 阅读 · 0 评论 -
Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)
mybatis plus自动生成代码时的注意事项原创 2022-06-11 16:49:22 · 4760 阅读 · 0 评论 -
No converter for [class com.defei.sms.result.Result] with preset Content-Type ‘null‘
错误:没有预设内容类型为“null”的[class com.defei.sms.result.result]的转换器网上解决办法:1.Result这个类没有getter\setter方法,在类里添加上该方法或者加lombok的@Data注解在类上2.说是缺少json转换包,引入以下包<dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>ja原创 2021-12-08 11:27:04 · 7310 阅读 · 7 评论 -
Maven引入nacos的版本问题以及如何在阿里Maven仓库中找到想要的jar和Maven中的groupId、artifactId、version
问题:Cannot resolve com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-discovery:1.4.1意思就是不能用maven加载到这个1.4.1版本的 artifactId 为 spring-cloud-starter-alibaba-nacos-discovery的jar,说白了就是maven库里面没有找到这个artifactId的jar问题产生的背景:本人最近在学spring cloud alibaba,然后一个教学视频里.原创 2021-04-08 18:37:52 · 19845 阅读 · 16 评论 -
Mapped Statements collection does not contain value for 解决方法之一
项目刚开始是用springboot + mybatis的框架,后面因为有一部分功能需求,就又添加了mybatis-plus的jar包,用的时候就发现偶尔会报错,Mapped Statements collection does not contain value for...其实就是mapper.xml文件和dao之间映射出了问题,我的mapper.xml文件和dao文件中的名字什么的都是没问题的。最后一想是不是同一个项目用了mybatis和mybatis-plus导致冲突了,于是查了一下其他人的情况,原创 2021-03-02 12:06:39 · 2477 阅读 · 0 评论 -
springboot中配置文件里日志文件的路径配置logging.file和logging.path过时处理
我用的springboot版本文2.2.4,这个版本中在application.yml中配置logging日志输出路径时,网上很多都说配置如下logging.path或者是logging.file但是我去配置时,提示过时了。那么就用新的配置来代替logging.file.name或者是logging.file.path,那么这两个的区别是什么呢?如下例子:例子1:logging: file: name: test.log这种配置当为window环境时会在项目...原创 2020-07-03 16:49:55 · 8115 阅读 · 0 评论 -
使用SpringBoot连接mysql时出现 CLIENT_PLUGIN_AUTH is required
出现问题背景:1.springboot项目,springboot版本为2.2.42.在pom.xml中配置mysql连接jar时我没有指定版本。<dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <scope>runtime</scope></dependency&原创 2020-05-21 10:35:45 · 594 阅读 · 0 评论 -
java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO)
今天用springboot项目连接数据库时报了这个错误:org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:### Error querying database. Cause: org.springframewor...原创 2020-04-10 08:31:51 · 2296 阅读 · 0 评论 -
Failed to read artifact descriptor for org.springframework.boot:spring-boot-starter-Thymeleaf:jar
在springboot项目中用的springboot是2.2.6的版本,在pom中引入Thymeleaf。pom.xml中引入的内容为:<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymel...原创 2020-04-01 20:43:51 · 2078 阅读 · 2 评论 -
给PDF文件添加一维码和文字内容
1.在pom.xml引入pdfbox的jar包和一维码生成的jar包<!-- PDF解析包 --><dependency> <groupId>org.apache.pdfbox</groupId> <artifactId>pdfbox</artifactId> <version>2....原创 2020-03-23 12:36:52 · 774 阅读 · 0 评论 -
Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection
在此说一下这个数据库连接异常的原因。真是巨坑啊!!!查了好多帖子都没有解决。最后突然想起了以前看过的一个帖子才解决!错误如下:Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLE...原创 2020-02-11 17:14:21 · 5559 阅读 · 4 评论 -
javaweb项目实现登陆验证码功能
1.首先是前端:需要在页面有个img标签来接收后台返回的验证码图片在页面中加入img标签:<img id="checkImg">,并添加id以便获取验证码图片我这边是页面一加载就加载了验证码,所以我在js文件里是这样写的:$(document).ready(function () {//这里在url中加时间是因为让url变化$("#checkImg").att...原创 2020-01-13 13:15:52 · 1977 阅读 · 0 评论