![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
Java
java相关的知识
那条大鱼
有光的地方就有希望!
展开
-
Redis如何实现分布式锁?
redis如何实现分布式锁?本篇文章浅谈一下转载 2022-10-27 17:37:36 · 8559 阅读 · 2 评论 -
springboot报错:java.sql.SQLException: Parameter index out of range (1 > number of parameters
在修改mybatis文件时突然报了这个错:java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0). at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129) ~[mysql-con原创 2021-04-10 18:25:12 · 834 阅读 · 0 评论 -
springboot关于日期报错No converter found capable of converting from type [java.util.Date] to type的解决
在页面对时间操作时报错:nested exception is org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [java.util.Date] to type [@org.springframework.format.annotation.DateTimeFormat java.sql.Date]]],提示无法将java.util.原创 2021-01-30 20:44:37 · 4316 阅读 · 3 评论 -
关于nested exception is org.apache.ibatis.reflection.ReflectionException报错问题
在实现项目的添加功能时,调试过程中报500错误,错误内容如下:20:13:43.154 ERROR 34144 --- [nio-8088-exec-4] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [R原创 2021-01-30 20:23:34 · 5564 阅读 · 0 评论 -
parameterType、resultType、resultMap的区别与不同
1. parameterType(输入类型) 1.1 传递简单类型 使用#{}占位符,或者${}进行sql拼接。 1.2 传递pojo对象 Mybatis使用ognl表达式解析对象字段的值,#{}或者${}括号中的值为pojo属性名称。 1.3 传递pojo包装对象 开发中通过...转载 2021-01-02 11:48:59 · 510 阅读 · 0 评论 -
which is incompatible with Spring Cloud Gateway at this time. Please remove spring-boot-starter-web
开发项目微服务和网关搭配使用的时候,报了如下所示的错误:*********************************************************Spring MVC found on classpath, which is incompatible with Spring Cloud Gateway at this time. Please remove spring-boot-starter-web dependency.************************原创 2020-11-11 21:28:16 · 2301 阅读 · 1 评论 -
解决Request method ‘GET‘ not supported的问题
首先这个错误很有可能是请求方式不正确引起的。springboot常见的请求方式有3种,分别是@RequestMapping,@GetMapping,@PostMapping,这三种注解分别是啥意思呢?下面简单介绍一下:**@RequestMapping:这是个综合注解,没有指定请求方式,因此可以接收post,get,put,head等的一系列的请求方式@GetMapping:这是get的请求方式,浏览器默认的就是这种请求方式,是@RequestMapping(method=RequestMethod原创 2020-11-10 21:32:49 · 82908 阅读 · 9 评论 -
MyBatis报错:Could not resolve type alias...
遇到这个问题,首先应该检查一下是否添加了注解@MapperScan,这个注解是用来扫描映射文件的,如果你没有加的话,他会找不到注解而导致报错,当然还有一种办法不用加这个注解,但是需要在配置文件中配置一下,这里就不过多论述了;还有就是在mapper文件中检查一下自己的resultType的路径是否正确;而我的错误就比较奇葩了,用代码生成器生成的mapper文件竟然有两个,然后他就扫描到另一个去了,就报了别名错误的错了.原创 2020-11-08 09:40:15 · 12144 阅读 · 2 评论 -
关于getBaseMapper()‘ in ‘com.baomidou.mybatisplus.extension.service.impl.ServiceImpl‘ clashes with的问题
使用generator代码生成器生成了基本的增删改查的代码,但是在service层的实现类serviceImpl却出现了getBaseMapper()’ in ‘com.baomidou.mybatisplus.extension.service.impl.ServiceImpl’ clashes with ‘getBaseMapper()’ in ‘com.baomidou.mybatisplus.extension.service.IService’; attempting to use incompa原创 2020-11-06 21:51:30 · 4756 阅读 · 6 评论 -
IDEA出现错误:找不到或无法加载主类 io.renren.RenrenApplication
出现这个错误,很大可能是idea本身的缓存造成的,所以可以选择清理缓存并重启idea,选择file–>Invalidate catchs/Restart;如果这个方法不成功的话,可以尝试mvn clean/install 一下;当然我的问题都不是这两个,因为我自己也没有动代码,检查了半天,发现src文件夹居然不见了!!!不知道是谁不小心碰到了鼠标给删了吧,做个笔记,面得有人也采坑!...原创 2020-11-04 21:52:44 · 7323 阅读 · 2 评论 -
关于java.lang.NoSuchMethodError: org.yaml.snakeyaml.LoaderOptions.setMaxAliasesForCollections(I)V报错的问题
关于java.lang.NoSuchMethodError: org.yaml.snakeyaml.LoaderOptions.setMaxAliasesForCollections(I)V报错的问题这几天做一个项目的时候,出现了如下所示的错误:07:17:04.750 [background-preinit] DEBUG org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator - Loaded exp原创 2020-11-04 07:56:44 · 17734 阅读 · 10 评论 -
如何编辑使用Markdown?
Markdown学习(一级标题)一级标题:#+空格二级标题二级标题:两个##+空格,以此类推三级标题四级标题字体Hello,Tepora!加粗:在前后都加上两个*Hello,Tepora!斜体:在前后都加上一个*Hello,Tepora!斜体加粗:在前后都加上三个*Hello,Tepora!删除线:在前后都加上两个~引用Java是一门经久不衰的面向对象语言!引用:>+空格实现引用分割线分割线:三个-或者三个*图片[外链图片转存失败,源站可能有防盗链机制,原创 2020-06-14 14:51:59 · 224 阅读 · 0 评论 -
springboot项目启动遇到问题:AopAutoConfiguration matched: - @ConditionalOnProperty (spring.aop.auto=true)
今天写后台接口测试数据库的时候遇到了这个小问题,上网上查找也是没有解决我的问题,如下所示:Positive matches:----------------- AopAutoConfiguration matched: - @ConditionalOnProperty (spri...原创 2020-03-28 14:20:57 · 29144 阅读 · 9 评论 -
idea报错Cause: org.apache.ibatis.type.TypeException: Error setting non null for parameter #3 with Jdbc
这里写自定义目录标题欢迎使用Markdown编辑器新的改变功能快捷键合理的创建标题,有助于目录的生成如何改变文本的样式插入链接与图片如何插入一段漂亮的代码片生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants创建一个自定义列表如何创建一个注脚注释也是必不可少的KaTeX数学公式新的甘特图功能,丰富你的文章UML 图表FLowchart流程图导出与导入导出导入今天运行项目...原创 2020-03-23 18:02:04 · 3046 阅读 · 0 评论