java.lang.IllegalStateException: Cannot load configuration class: com.atguigu.config.MainConfig
最新推荐文章于 2023-08-17 14:22:48 发布
最新推荐文章于 2023-08-17 14:22:48 发布 阅读量 8.1k

问题描述:

  • 出现这个这个问题原因很简单,就是项目的jdk没有进行配置,需要通过项目的Properties或者build path里面的library对项目的jdk进行配置。
  • 在这里插入图片描述
    在这里插入图片描述

解决步骤:

1、右击该项目,然后名点击进入Properties

2、add library

选中如图所示,然后点击next
在这里插入图片描述

3、找到自己的jdk目录

如图点击中间位置,然后点击Installed JREs
在这里插入图片描述

4、点击add

5、点击如图,然后下一步

6、点击Directory

7、选中jdk文件夹

这里选中的是整个jdk文件夹而不是bin文件夹,需要注意
在这里插入图片描述

8、点确定然后finish

9、更换jdk环境

10、最后验证,再打开项目的propertis,这里的JRE需要选择的是JDK,如果选中的是JRE,可能依然会报错。

java . lan g. IllegalStateException : The content of the adapter has changed but ListView did not receive a notification. Make sure the content of your adapter is not modified from a background thread, but only from the UI thread. [in ListView(2131230720, class android.widget.ListView) with Adapter( class com .example.listviewdemo.UserListAdapter)] java . lan g. IllegalStateException : Cannot load configuration class : org. spring framework.session.data.redis. config .annotation.web.http.RedisHttpSession Configuration 报错问题处理 Spring java . lan g. IllegalStateException : Cannot load configuration class 异常 将项目SDK从jdk_16换成jdk_1.8即可 参考:https://teratail. com /questions/153773 系统:Windows 10 x64 项目SDK环境:jdk_16 开发工具:IntelliJ IDEA 2021.1 x64 pom.xml如下 <dependency> java . lan g. IllegalStateException : Cannot load configuration class : com .alibaba.csp.sentinel.dashboard.DashboardApplication 1、错误信息 异常:Caused by: java . lan g. IllegalStateException : Method has too many Body parameters Caused by: java . lan g. IllegalStateException : Method has too many Body parameters: public abstract com .iot.framework.core.response. Com mResponse com .iot.basic. config .api.client. config data.PushRuleClient.getByEven java . lan g. IllegalStateException : Cannot load configuration class : com .at gui gu . config . Main Config 问题处理 当启动时报错,查看错误信息,如Cannot load configuration class : org.mybatis. spring .boot.auto config ure.MybatisAuto Configuration 就是无法加载配置类mybatis,为什么无法加载,就需要去看pom文件的mybatis依赖有没有写错,以及版本 mybatis的3.4.0及以上版本只支持mybatis-sp... 启动 Spring Boot项目时,控制台报错,日志如下 Caused by: java . lan g. IllegalStateException : Failed to load property source from location ' class path:/application.yml' at org. spring framework.boot.context. config . Config FileA... Caused by: java . lan g. IllegalStateException : Attempted to load application Config : [ class path:/application.yml] but snakeyaml was not found on the class path 严重: Application run failed ***error:*** 这个问题出在pom.xml 文章目录前言一、HikariPool-1 - Exception during pool initialization二、Failed to config ure a DataSource: 'url' attribute is not specified and no embedded datasource could be config ured.三、 java . lan g. IllegalStateException : Cannot load configuration class : org.apache.ro java . lan g. IllegalStateException 错误解决过程 今天在搭建 spring boot 项目的过程中出现了以下的错误,也是花了好长时间才解决,今天我就来分享一下我解决报错的过程。 2021-01-18 19:59:28.637 ERROR 19504 --- [ main ] o.s.boot. Spring Application : Application run failed java . lan g.IllegalStateExcept 检查代码无果,搜索csdn得到的方法一个是换回jdk1.8版本(未尝试),另一个是因为没有导入 spring -core包,检查报错内容果然如此,导入5.0.5Release版本还是报错,最后导入5.3.18问题解决。