Description: Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured. Reason: Failed to determine a suitable driver class Action: Consider the following: If you want an embedded database (H2, HSQL or Derby), please put it on the classpath. If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active). Disconnected from the target VM, address: '127.0.0.1:56285', transport: 'socket'报错排查
项目依赖如下:
4.0.0 org.springframework.boot spring-boot-starter-parent 2.6.3 com.hfwas spring_redis 0.0.1-SNAPSHOT 11-spring-redis Demo project for Spring Boot 1.8 org.springframework.boot spring-boot-starter-actuator org.springframework.boot spring-boot-starter-data-redis org.apache.commons commons-pool2 2.11.1 redis.clients jedis 3.3.0 org.springframework.boot spring-boot-starter-jdbc org.springframework.boot spring-boot-starter-web mysql mysql-connector-java runtime org.projectlombok lombok true org.springframework.boot spring-boot-starter-test test org.springframework.boot spring-boot-maven-plugin org.projectlombok lombok
搜索之后,这个报错可能是因为引入了mysql的依赖,但是没有配置url参数导致的 解决办法
去掉mysql的依赖。顺带吧jdbc依赖也去掉
参考https://www.baeldung.com/spring-boot-failed-to-configure-data-source



