Quantcast
Channel: Active questions tagged redis+java - Stack Overflow
Viewing all articles
Browse latest Browse all 2204

Can't reference import org.springframework.data.redis even though I have correct dependency

$
0
0

I'm new to IntelliJ/Kotlin; in my .kts file:

plugins {    id("java")    id("io.spring.dependency-management") version "1.0.12.RELEASE"    id("org.springframework.boot") version "2.7.0"}group = "org.example"version = "1.0-SNAPSHOT"repositories {    google()    mavenLocal()    maven( "https://jitpack.io" )    maven("https://maven.aliyun.com/repository/google/")    maven("https://maven.aliyun.com/repository/public/")    maven("https://maven.aliyun.com/repository/spring/")    maven("https://maven.aliyun.com/repository/gradle-plugin/")    maven("https://maven.aliyun.com/repository/spring-plugin/")    mavenCentral()    maven("https://plugins.gradle.org/m2")}dependencies {    //https://medium.com/@krishnan.srm/springboot-kotlin-and-redis-great-partners-9207fe79c329    implementation("org.springframework.data:spring-data-commons")    implementation("org.springframework.boot:spring-boot-starter-actuator")    implementation("org.springframework.boot:spring-boot-starter-data-redis")    implementation("org.springframework.boot:spring-boot-starter-web")    implementation("org.springframework.data:spring-data-redis:2.7.0")    implementation("com.fasterxml.jackson.module:jackson-module-kotlin")    implementation("org.jetbrains.kotlin:kotlin-reflect")    implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")    //implementation("org.jetbrains.kotlin:kotlin-gradle-plugin")    implementation("org.springframework.boot:spring-boot-starter-data-jpa")    implementation("org.springframework.boot:spring-boot-starter-mustache")    implementation("org.springframework.boot:spring-boot-starter-web")    implementation("com.fasterxml.jackson.module:jackson-module-kotlin")      }}

but then in my Main.java,

import org.springframework.data.redis.core.RedisHash;import org.springframework.data.redis.core.index.Indexed;

it doesn't recognize the "redis" part of the import ("redis" is in red, unresolved reference to redis)

What am I doing wrong?


Viewing all articles
Browse latest Browse all 2204

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>