
error
生命不息战斗不止!
面壁十年图破壁,难酬蹈海亦英雄。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
ClassNotFoundException与NoClassDefFoundError
查资料发现是springcloud的依赖版本和springboot的依赖版本不兼容,顺藤摸瓜找到springcloud jar包中调用org.springframework.boot.context.properties.ConfigurationPropertiesBean的位置上,发现果然,当前项目中所引入的springbootboot jar包版本并没有这个类。所以明显是当前springboot版本不适配springcloud,调整版本即解决报错。原创 2023-10-01 12:58:24 · 446 阅读 · 0 评论 -
An attempt was made to call the method xxx.jedis but it does not exist
在公司项目中做配置迁移的时候,服务启动时报错报错信息这种问题一看就是maven引入第三方依赖相关问题,该问题导致这个springboot服务启动报错,其实这种报错还是看上去比较舒服的,这个报错提示是非常到位,咱们试着理解下这个报错提示。原创 2023-10-01 12:18:06 · 685 阅读 · 0 评论 -
SpringBoot测试失败并报错: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration
方法1 该测试类在Test下的包名和java下的包名不一致导致的,修改包名一致即可由于包名自动生成的缘故导致这两个包名不一致,引发以下报错java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=…) with your test 解决:修改包名一致,如图问题解决2 如果不原创 2021-04-06 15:31:34 · 93185 阅读 · 28 评论 -
Statement returned more than one row, where no more than one was expected
简单翻译下这个报错:返回值(对象)数目超过了一个,预期值不应该超过一个也就是说mybatis连表查询中如果用了associate,如那么该类对象(projectPO)和它的对象属性(typePO)应该是一对多的关系,typePO属性应该被封装为List@Data@NoArgsConstructor@AllArgsConstructorpublic class ProjectPO { private List<TypePO> typePO; //...........原创 2021-03-12 12:07:35 · 630 阅读 · 0 评论 -
idea报“Usage of API documented as @since 1.7”这一问题的解决方法
https://blog.csdn.net/weixin_42687829/article/details/86751174转载 2021-03-05 18:12:10 · 201 阅读 · 0 评论 -
超详细:Springboot连接centos7下redis6的必要配置和失败分析
问题描述:今天使用springboot的时候,想要整合redis做下测试,却怎么都连不上redis 解决方案:1、确认redis有没有开启,使用ps -ef | grep redis命令来确认,显示以下信息证明链接成功图片显示表示已经开启,如果没有开启的话。通过 ./redis-server命令开启2、着找到redis的配置文件redis.conf。直接进入redis在linux下的安装目录,一般默认安装在/usr/local下cd /usr/local/redis //直接进入re原创 2021-02-22 19:18:09 · 617 阅读 · 1 评论 -
Error:No-bean-named-springSecurityFilterChain-available
问题描述:web项目启动失败,查看日志发现报错:No bean named ‘springSecurityFilterChain’ available注意:我的springsecurity是以配置文件的方式配置的;org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'springSecurityFilterChain' available 原因分析:原因不难分析,肯定是我们的spri原创 2021-02-19 20:07:30 · 1078 阅读 · 1 评论 -
SpringMVC错误:No mapping found for HTTP request with URI [xxxx] in DispatcherServlet
详细报错如下:[No mapping found for HTTP request with URI [/webui/menu/get/whole/tree.json] in DispatcherServlet with name 'springDispatcherServlet']原因分析,我总结了三点1 当前handler(Controller类)没有被加入ioc容器,不是其中的组件,原因可能是忘了加@Controller注解springmvc配置文件的自动包扫描component-scan原创 2021-02-17 14:46:24 · 5902 阅读 · 2 评论 -
java.sql.SQLException: Parameter index out of range (5 > number of parameters, which is 4).
问题描述: 启动项目调接口的时候控制台报错Cause: java.sql.SQLException: Parameter index out of range (5 > number of parameters, which is 4).原因分析: 可以看到控制台日志输出了下面这一句话### The error occurred while setting parameters很好理解,注入参数的时候发生错误,那肯定就是自己写的sql有问题了,而且是参数绑定类型的错误.原创 2021-02-15 11:36:29 · 8258 阅读 · 4 评论 -
java分页插件PageHelper的内置list数据操作失败
问题描述:java分页插件PageHelper的内置list数据在hanlder处理器中获取失败,但是测试确通过了,如下图 但是测试代码成功@ContextConfiguration(locations = {"classpath:spring-persist-mybatis.xml", "classpath:spring-persist-tx.xml"})@RunWith(SpringJUnit4ClassRunner.class)public class Test {原创 2021-02-14 19:24:38 · 861 阅读 · 3 评论 -
IntelliJ Idea解决Could not autowire. No beans of ‘xxxx‘ type found的错误提示
1.问题描述在Idea的spring工程里,经常会遇到Could not autowire. No beans of ‘xxxx’ type found的错误提示。但程序的编译和运行都是没有问题的,这个错误提示并不会产生影响但看起来十分难受。报错位置 AdminMapper类2 解决方法方法1:在mapper文件上加@Repository注解(我之前用的是@Mapper),这是从spring2.0新增的一个注解,用于简化 Spring 的开发,实现数据访问方法,如图方法二:在mapper原创 2021-02-12 17:40:35 · 2019 阅读 · 3 评论 -
http://java.sun.com/jsp/jstl/core cannot be resolved(含有jstl1.2jar包网盘)
先检查声明是否正确JSTL 1.0 的声明是:<%@ taglib prefix=“c” uri="http://java.sun.com/jstl/core " %>JSTL1.1 和1.2的声明是:<%@ taglib prefix=“c” uri=http://java.sun.com/jsp/jstl/core %>经个人分析,在个人引入pom jstl依赖成功后依然无法解析jstl的引用地址uri的资源,那么肯定是tomcat服务器处理有问题,首先要检查的就是to原创 2021-02-11 18:19:30 · 2621 阅读 · 5 评论 -
java.lang.ClassNotFoundException: org.apache.jsp.WEB_002dINF.classes.views.index_jsp
这种问题最好是显示声明一下jdk的版本,方法是在pom中引入以下插件<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version>原创 2021-02-11 17:33:15 · 1293 阅读 · 0 评论 -
Error:java: Annotation processing is not supported for module cycles.异常解决
Error:java: Annotation processing is not supported for module cycles. Please ensure that all modules from cycle [wzhfunding-admin-webUI01,wzhfunding-admin-componet] are excluded from annotation processing此类错误,大致意思就是说我wzhfunding-admin-webUI01模块(模块a)和wzhfun原创 2021-02-10 08:57:03 · 22203 阅读 · 3 评论 -
解决 transaction-manager Attribute transaction-manager is not allowed here
idea根据你的事务自动生成的命名空间如下:将上面红色标注的代码换成如下即可:xmlns:tx="http://www.springframework.org/schema/tx"原创 2021-02-09 11:07:57 · 1114 阅读 · 0 评论 -
seata不兼容mysql8的解决方案
前言数据库:8.0.16版本。seata:0.9.0问题启动seata之后,空指针异常之类的各种错误。原因seata不兼容8.x.x的数据库。解决方案删除旧jar包,更换新jar包 注意,一个lib包下千万不要出现同一类型但不同版本的jar包。修改驱动路径名称更改这里的url,dirver,user,password这里到底如何如何修改?不要问更不要查,找自己本地项目链接成功的配置案例,如下,这是我之前链接成功的本地项目,直接拿来用就行,然后把只需要把url中的数据库部分改为se原创 2021-02-05 10:33:16 · 2050 阅读 · 0 评论 -
AOP Error creating bean with name ‘myCaculator‘ defined in file [XXX]
大家看一下详细报错org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘myCaculator’ defined in file [C:\Users\20289\Desktop\workspace\Spring\out\production\SpringTest\caculator\noInterface\MyCaculator.class]: Initialization of be原创 2021-02-03 16:43:09 · 620 阅读 · 2 评论 -
rabbitmq-plugins.bat enable rabbitmq_management
RabbitMQ 启用维护插件时出现Error在进入D:\MQ\RabbitMQ\rabbitmq_server-3.7.7\sbin>使用rabbitmq-plugins enable rabbitmq_management报错,具体情况如图提示信息:Error: {:plugins_not_found, [:rabbitmq_managemen]}找不到插件错误#解决办法:使用在rabbitmq-plugins后面加上".bat",在sbin目录下运行rabbitmq-plugins.b原创 2021-02-01 16:49:59 · 2480 阅读 · 3 评论 -
org.springframework.web.client.ResourceAccessException: I/O error on POST request for ************
org.springframework.web.client.ResourceAccessException: I/O error on POST request for “http://localhost:9411/api/v2/spans”:原因:pom依赖中含有 zipkin 依赖,没有配置 zipkin-server, 默认提交9411解决办法:将这个依赖删除 <dependency <groupId>org.springframework.cloud&l原创 2021-01-26 18:43:03 · 5756 阅读 · 0 评论 -
解决Nacos无法连接Mysql8.0+的问题
如果你的mysql是8.0以上的的就不要在参考阿里的官方文档了,因为阿里的文档只适用于mysql5版本,再次吐槽一下,阿里的文档才是真正的挖坑埋人!!!,以下才是标准的配置过程1 初始化mysql数据库,建立一个名为nacos_config的数据库,然后执行nacos-mysql.sql文件,该文件在nacos的conf文件夹下,如下2 在nacos安装目录下新建plugins/mysql文件夹(plugins和bin,conf在同一层级),并放入8.0+版本的mysql-connector-java原创 2021-01-24 16:45:24 · 4290 阅读 · 7 评论 -
注册Nocos配置中心失败:Could not resolve placeholder ‘config.info‘ in value “${config.info}
一 、标准的nacos配置模块内容1 bootstrap.yml# nacos配置server: port: 3377spring: application: name: nacos-config-client cloud: nacos: discovery: server-addr: localhost:8848 #Nacos服务注册中心地址 config: server-addr: localhost:8848原创 2021-01-24 09:10:17 · 7592 阅读 · 1 评论 -
配置springcloud配置中心读取github上的配置文件报错:com.jcraft.jsch.JSchException: Auth fail解决方案
首先,在配置中检查要读取的分支是否正确,从2020年几月份开始,github上的master分支变为了mian分支。因此yml中读取分支的配置应该是:label: main其次,如果yml使用的是uri: [email protected]:***/springcloud-config.git这种ssh方式连接的话,需要进行其他的配置,因此我放弃了这种方式进行配置,而采用http/https方式进行配置。值得注意的是,采用http和https方式,如果没配置免密的话,需要在配置文件中加入密码及用户名。详细案例原创 2021-01-23 09:49:25 · 2342 阅读 · 5 评论