Fork me on GitHub

java.lang.NoClassDefFoundError: Could not initialize class 解决方法

在配置数据库连接池的时候抛出Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class异常

经过苦苦查询之后发现是缺少commons-logging.jar包

导入commons-logging.jar依赖再运行就能成功连接数据库了

posted @ 2021-02-22 15:07  雾深  阅读(7099)  评论(0编辑  收藏  举报