报错:
Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled.
java.lang.IllegalStateException: Failed to execute CommandLineRunner
Caused by: org.springframework.data.redis.connection.PoolException: Could not get a resource from the pool; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to localhost:6379
Caused by: io.lettuce.core.RedisConnectionException: Unable to connect to localhost:6379
因为是第一次运行spring boot项目,大概率是因为没有安装redis,redis服务没有开启导致。
参考文章:
SpringBoot项目报错解决:“Error starting ApplicationContext. To display the conditions report re-run …”
Could not get a resource from the pool; nested exception is io.lettuce.core.RedisConnectionException
安装redis并开启redis服务后,可进行运行