Jiiiiiin commented on issue #3905: URL: https://github.com/apache/shenyu/issues/3905#issuecomment-1464930560
我也遇到对应的问题, 环境: macos (13.2.1 (22D68)) Docker Compose version v2.15.1 Docker version 20.10.23, build 7155243 shenyu <version>2.6.0-SNAPSHOT</version> 直接 clone 从master; 按照文档:https://shenyu.apache.org/zh/docs/deployment/deployment-local/ 使用 mysql,已初始化脚本,项目使用idea打开,maven 和 idea编译成功,唯一区别,由于使用 nacos 构建注册中心,所以 mysql 沿用其 compose 启动版本: ```bash +-----------+ | version() | +-----------+ | 8.0.31 | +-----------+ ``` 启动之后即: ```bash Caused by: java.lang.IllegalStateException: Cannot load driver class: com.mysql.cj.jdbc.Driver at org.springframework.util.Assert.state(Assert.java:97) at org.springframework.boot.autoconfigure.jdbc.DataSourceProperties.determineDriverClassName(DataSourceProperties.java:241) at org.springframework.boot.autoconfigure.jdbc.DataSourceProperties.initializeDataSourceBuilder(DataSourceProperties.java:193) at org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration.createDataSource(DataSourceConfiguration.java:48) at org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration$Hikari.dataSource(DataSourceConfiguration.java:90) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ... 86 common frames omitted ``` 根据上面的讨论,目前通过以下idea配置解决: <img width="869" alt="Pasted Graphic" src="https://user-images.githubusercontent.com/8840636/224491879-88250e9c-023b-416b-8549-84bb1399987b.png"> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
