Springboot Failed to parse configuration class [x]
错误日志:
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [com.zxycloud.common.MybatisGeneratorApplication]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/redisConfig.properties]at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:181)at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:315)at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:232)at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:275)at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:95)at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:691)at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:528)at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775)at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)at org.springframework.boot.SpringApplication.run(SpringApplication.java:316)at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:127)at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:99)at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:117)... 25 common frames omitted
idea在install和package是出现此错,自己的配置文件,启动类书写都正确,但就是为什么会找不到配置呢?
原因是这个:错误的核心信息是找不到一个properties文件
代码中写配置文件路径的时候没有加上classpath。 正常的使用的代码应该像这样:
没加classpath会报错,导致install失败
Springboot Failed to parse configuration class [x]相关推荐
- Springboot Failed to parse configuration class x nested exception is Java class path resource
1.发现问题 springboot项目完成启动时报错.启动失败. 2.分析问题 Springboot Failed to parse configuration class [com.ibm.App] ...
- Springboot Failed to parse configuration class [x]; nested exception
2019独角兽企业重金招聘Python工程师标准>>> 1.前言 在使用Springboot时,我们偶尔会单独引用一些特定的properties文件,在引用这些文件时,我们就应用到了 ...
- Failed to parse configuration class [Application] 报错
org.springframework.beans.factory.BeanDefinitionStoreException:Failed to parse configuration class [ ...
- 报错:NestedIOException: Failed to parse mapping resource
报错:NestedIOException: Failed to parse mapping resource 详细信息如下: BeanInstantiationException: Failed to ...
- 解决:org.springframework.web.multipart.MultipartException: Failed to parse multipart servlet request;
项目场景: 微服务修改保存,出现系统异常 问题描述 报错日志如下: | 2022-10-24 11:32:42.882 |-[1;31mERROR[m [http-nio-9000-exec-4] [ ...
- 关于Could not parse configuration: /hibernate.cfg.xml的问题
第一次在eclipse上配置hibernate,问题百出啊,比如下面的org.hibernate.HibernateException: Could not parse configuration: ...
- Unsupported format or combination of formats) Failed to parse onnx model
Unsupported format or combination of formats) Failed to parse onnx model 加载模型时报错: cv2.dnn.readNetFro ...
- ASM ClassReader failed to parse class file
前言 维护很久以前的项目时,出现这个问题:ASM ClassReader failed to parse class file 分析 经过网上搜索该问题,发现是spring版本引起的. Note th ...
- GConf error:Failed to contact configuration server
Linux系统运行一直正常,但是图形界面使用root账号登录时遇到下面错误,第一次遇到这么怪异的状况 具体错误信息如下所示: GConf error:Failed to contact configu ...
最新文章
- python官方下载步骤-Python 下载及安装详细步骤
- 打jar时包含所有依赖(maven-assembly-plugin)
- python两个不同变量相加_Python:是否可以链接属于两个不同类的两个变量?
- 在java中将数据信息写入文本中(2)
- centos国内yum源
- 20169217 《Linux内核原理与分析》第七周作业
- 私有云之迷思:未来是什么?
- 可能是最强大的【CSS】动画库
- PCI总线特性及信号说明
- 制作登录注册密码找回网站常用控件
- python qt designer 重定向_[Python自学] PyQT5-QTDesigner中关联信号和槽
- python第七章-文件和数据格式化
- RocketMQ实战2
- 理解SparkSteaming窗口函数操作window()
- 听歌识曲算法技术[语音识别]
- C语言基础:求解一元二次方程
- 2023年五面蚂蚁、三面拼多多、字节跳动最终拿offer入职拼多多
- 【软件教程】如何将夸克网盘挂载为本地磁盘【Docker+AList+RaiDrive】
- C++(11):通过is_same检查类型,decay退化类型
- 【威胁通告】攻击者利用漏洞攻击Edimax WiFi桥接器