0

I use Spring Boot and redis. I added in pom.xml:

 <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-redis</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.data</groupId>
        <artifactId>spring-data-redis</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
  </dependency>

And created class RedisConfig, which contains Beans JedisConnectionFactory jedisConnectionFactory and RedisTemplate< String, Object > redisTemplate().

When I run application, I get error:

***************************
APPLICATION FAILED TO START
***************************

Description:

Cannot determine embedded database driver class for database type NONE

Action:

If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it (no profiles are currently active).

I don't use a embeded redis. Redis work on my computer on localhost.

application.properties:

spring.redis.host=localhost
spring.redis.port=6379

Why there is this error?

RAS
  • 197
  • 5
  • 18
  • Have you tried what was suggested here - https://stackoverflow.com/questions/24074749/spring-boot-cannot-determine-embedded-database-driver-class-for-database-type?rq=1 – Prashant Jul 03 '17 at 02:32

1 Answers1

1

There is a couple of issues:

  1. spring-boot-starter-redis is deprecated. Use spring-boot-starter-data-redis instead.
  2. Remove the spring-boot-starter-data-jpa dependency. Spring Data Redis does not support JPA and it's not needed. This is actually causing your error.
Strelok
  • 50,229
  • 9
  • 102
  • 115