'Intellij Idea Jpa Repository suggestion is not working

I created a Spring Boot project on Intellij Idea here is my configuration Spring Boot version: id 'org.springframework.boot' version '2.6.7' Intellij Idea Build #IU-221.5080.210, built on April 12, 2022 here is my build.gradle file

plugins {
    id 'org.springframework.boot' version '2.6.7'
    id 'io.spring.dependency-management' version '1.0.11.RELEASE'
    id 'java'
    id 'net.ltgt.apt' version '0.21'
}
group = 'io.project'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = "17"

configurations {
    compileOnly {
        extendsFrom annotationProcessor
    }
}
repositories {
    mavenCentral()
}
dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-data-jdbc'
    implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
    implementation 'org.springframework.boot:spring-boot-starter-jdbc'
    implementation 'org.springframework.boot:spring-boot-starter-web'
    implementation 'org.springdoc:springdoc-openapi-ui:1.6.8'
    implementation 'org.hibernate.validator:hibernate-validator:7.0.4.Final'
    implementation 'org.mapstruct:mapstruct:1.4.2.Final'
    annotationProcessor 'org.mapstruct:mapstruct-processor:1.4.2.Final'
    compileOnly 'org.projectlombok:lombok'
    runtimeOnly 'org.postgresql:postgresql'
    annotationProcessor 'org.projectlombok:lombok'
    testImplementation 'org.springframework.boot:spring-boot-starter-test'
}

tasks.named('test') {
    useJUnitPlatform()
}
targetCompatibility = JavaVersion.VERSION_17

and here is one of my classes that extends JpaRepository

@Repository
public interface CommentRepository extends JpaRepository<CommentEntity, Long> {
    List<CommentEntity> findAllByPostId(Long postId);
}

when I try to write my methods name I do not get suggestions from JpaRepository

any idea why this is happening?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source