Reputation: 115
I am new to spring.
I was trying to upgrade spring boot version from 2.3.3.RELEASE to 2.6.7 in existing spring batch project.
Project build completed successfully but I am getting bellow error when I run batch. Please help. Error
{ {"@timestamp":"2023-10-03T14:19:22.469+05:30","@version":"1","message":"Application run failed","logger_name":"org.springframework.boot.SpringApplication","thread_name":"restartedMain","level":"ERROR","level_value":40000,"stack_trace":"java.lang.IllegalStateException: Error processing condition on org.springframework.boot.actuate.autoconfigure.metrics.data.RepositoryMetricsAutoConfiguration.metricsRepositoryMethodInvocationListener\n\tat org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:60)\n\tat org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:108)\n\tat org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForBeanMethod(ConfigurationClassBeanDefinitionReader.java:193)\n\tat org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:153)\n\tat org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:129)\n\tat org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:343)\n\tat org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:247)\n\tat org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:311)\n\tat org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:112)\n\tat org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:748)\n\tat org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:564)\n\tat org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147)\n\tat org.springframework.boot.SpringApplication.refresh(SpringApplication.java:731)\n\tat org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408)\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:307)\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:1303)\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:1292)\n\tat com.abc.edocagentui.Application.main(Application.java:12)\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n\tat java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:566)\n\tat org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:50)\nCaused by: java.lang.IllegalStateException: @ConditionalOnMissingBean did not specify a bean using type, name or annotation and the attempt to deduce the bean's type failed\n\tat org.springframework.boot.autoconfigure.condition.OnBeanCondition$Spec.validate(OnBeanCondition.java:490)\n\tat org.springframework.boot.autoconfigure.condition.OnBeanCondition$Spec.(OnBeanCondition.java:439)\n\tat org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchOutcome(OnBeanCondition.java:155)\n\tat org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:47)\n\t... 22 common frames omitted\nCaused by: org.springframework.boot.autoconfigure.condition.OnBeanCondition$BeanTypeDeductionException: Failed to deduce bean type for org.springframework.boot.actuate.autoconfigure.metrics.data.RepositoryMetricsAutoConfiguration.metricsRepositoryMethodInvocationListener\n\tat org.springframework.boot.autoconfigure.condition.OnBeanCondition$Spec.deducedBeanTypeForBeanMethod(OnBeanCondition.java:520)\n\tat org.springframework.boot.autoconfigure.condition.OnBeanCondition$Spec.deducedBeanType(OnBeanCondition.java:509)\n\tat org.springframework.boot.autoconfigure.condition.OnBeanCondition$Spec.(OnBeanCondition.java:432)\n\t... 24 common frames omitted\nCaused by: java.lang.NoClassDefFoundError: org/springframework/data/repository/core/support/RepositoryMethodInvocationListener\n\tat java.base/java.lang.ClassLoader.defineClass1(Native Method)\n\tat java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)\n\tat java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)\n\tat java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:800)\n\tat java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:698)\n\tat java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:621)\n\tat java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:579)\n\tat java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)\n\tat java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)\n\tat java.base/java.lang.Class.forName0(Native Method)\n\tat java.base/java.lang.Class.forName(Class.java:398)\n\tat org.springframework.boot.devtools.restart.classloader.RestartClassLoader.loadClass(RestartClassLoader.java:145)\n\tat java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)\n\tat java.base/java.lang.Class.forName0(Native Method)\n\tat java.base/java.lang.Class.forName(Class.java:398)\n\tat org.springframework.boot.autoconfigure.condition.FilteringSpringBootCondition.resolve(FilteringSpringBootCondition.java:108)\n\tat org.springframework.boot.autoconfigure.condition.OnBeanCondition$Spec.getReturnType(OnBeanCondition.java:528)\n\tat org.springframework.boot.autoconfigure.condition.OnBeanCondition$Spec.deducedBeanTypeForBeanMethod(OnBeanCondition.java:516)\n\t... 26 common frames omitted\nCaused by: java.lang.ClassNotFoundException: org.springframework.data.repository.core.support.RepositoryMethodInvocationListener\n\tat java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)\n\tat java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)\n\tat java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)\n\t... 44 common frames omitted\n"} {"@timestamp":"2023-10-03T14:19:22.471+05:30","@version":"1","message":"Unable to close ApplicationContext","logger_name":"org.springframework.boot.SpringApplication","thread_name":"restartedMain","level":"WARN","level_value":30000,"stack_trace":"java.lang.IllegalStateException: Failed to introspect Class [org.springframework.boot.actuate.autoconfigure.metrics.data.RepositoryMetricsAutoConfiguration] from ClassLoader [jdk.internal.loader.ClassLoaders$AppClassLoader@7c53a9eb]\n\tat org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:485)\n\tat org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:361)\n\tat org.springframework.util.ReflectionUtils.getUniqueDeclaredMethods(ReflectionUtils.java:418)\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.lambda$getTypeForFactoryMethod$2(AbstractAutowireCapableBeanFactory.java:765)\n\tat java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1705)\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryMethod(AbstractAutowireCapableBeanFactory.java:764)\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:703)\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:674)\n\tat org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1684)\n\tat org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:570)\n\tat org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:542)\n\tat org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:669)\n\tat org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:661)\n\tat org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1306)\n\tat org.springframework.boot.SpringApplication.getExitCodeFromMappedException(SpringApplication.java:864)\n\tat org.springframework.boot.SpringApplication.getExitCodeFromException(SpringApplication.java:852)\n\tat org.springframework.boot.SpringApplication.handleExitCode(SpringApplication.java:839)\n\tat org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:779)\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:317)\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:1303)\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:1292)\n\tat com.abc.edocagentui.Application.main(Application.java:12)\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n\tat java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:566)\n\tat org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:50)\nCaused by: java.lang.NoClassDefFoundError: org/springframework/data/repository/core/support/RepositoryMethodInvocationListener\n\tat java.base/java.lang.ClassLoader.defineClass1(Native Method)\n\tat java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)\n\tat java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)\n\tat java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:800)\n\tat java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:698)\n\tat java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:621)\n\tat java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:579)\n\tat java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)\n\tat java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)\n\tat java.base/java.lang.Class.getDeclaredMethods0(Native Method)\n\tat java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3166)\n\tat java.base/java.lang.Class.getDeclaredMethods(Class.java:2309)\n\tat org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:467)\n\t... 26 common frames omitted\nCaused by: java.lang.ClassNotFoundException: org.springframework.data.repository.core.support.RepositoryMethodInvocationListener\n\tat java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)\n\tat java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)\n\tat java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)\n\t... 39 common frames omitted\n"}
}
my build.gradle
buildscript {
ext {
springBootVersion = "2.7.16"
awsSDKVersion = "1.12.300"
springCloudVersion = "2.2.5.RELEASE"
}
}
plugins {
id "org.springframework.boot" version "2.7.16"
id "com.abc.ccs.gradle.plugin.docker" version "2.0"
}
apply plugin: "java"
apply plugin: "idea"
apply plugin: "org.springframework.boot"
apply plugin: 'jacoco'
group "com.abc"
sourceCompatibility = 11
jacoco {
toolVersion = '0.8.5'
}
ccsDocker {
repositoryName = "microservices/edoc-agent-ui"
}
// Add integration test source sets
sourceSets {
integrationTest { sourceSet ->
["java", "groovy", "scala", "resources"].each {
if (!sourceSet.hasProperty(it)) return
sourceSet."$it".srcDir file("src/integrationTest/${it}")
}
}
}
configurations {
compile.exclude module: 'spring-boot-starter-tomcat'
}
dependencies {
implementation project(path: ":frontend", configuration: "output")
// Apache commons
implementation("org.apache.commons:commons-lang3:3.7")
// okhttpclient
implementation 'com.squareup.okhttp3:okhttp:3.12.3'
implementation 'com.squareup.okhttp3:logging-interceptor:3.12.3'
// Spring Boot
implementation("org.springframework.boot:spring-boot-starter-thymeleaf:${springBootVersion}")
implementation("org.springframework.boot:spring-boot-starter-web:${springBootVersion}")
implementation("org.springframework.boot:spring-boot-starter-actuator:${springBootVersion}")
implementation("org.springframework.boot:spring-boot-devtools:${springBootVersion}")
implementation("org.springframework.boot:spring-boot-starter-security:${springBootVersion}")
implementation("org.springframework.boot:spring-boot-starter-undertow:${springBootVersion}")
// javax annotations
implementation "org.hibernate.validator:hibernate-validator:6.0.20.Final"
// Sleuth, we need to list the dependencies manually as it uses BOM
implementation "org.springframework.cloud:spring-cloud-starter-sleuth:3.1.3"
//pdf fonts
implementation("com.abc:pdfutils-fonts:1.0.4")
// Metrics
implementation 'org.springframework.cloud:spring-cloud-aws-autoconfigure:2.2.6.RELEASE'
implementation 'io.micrometer:micrometer-registry-cloudwatch:1.10.2'
//CCS Metrics filtering
implementation('com.abc:ccs-spring-metrics:1.2')
// abc Security utils
implementation("com.abc:ccs-security:1.0.24")
// feign
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.8.7")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.8.7")
implementation("io.github.openfeign:feign-jackson:9.7.0")
implementation('io.github.openfeign:feign-okhttp:9.7.0')
implementation('io.github.openfeign:feign-slf4j:9.7.0')
implementation('io.github.openfeign.form:feign-form:3.3.0')
// swagger annotation, from java code copied from the edoc controller
implementation group: 'io.swagger', name: 'swagger-annotations', version: '1.5.0'
// spring sessions
implementation("org.springframework.session:spring-session-data-redis:2.3.0.RELEASE")
implementation("io.lettuce:lettuce-core:5.3.0.RELEASE")
// JWT
implementation("com.nimbusds:nimbus-jose-jwt:8.16")
// guava
implementation("com.google.guava:guava:25.1-jre")
// Apache libraries
implementation("commons-io:commons-io:2.6")
//logstash
implementation('net.logstash.logback:logstash-logback-encoder:7.2')
// aws
implementation("com.amazonaws:aws-java-sdk-s3:${awsSDKVersion}")
implementation("com.amazonaws:aws-java-sdk-ssm:${awsSDKVersion}"){
// https://github.com/spring-projects/spring-boot/issues/12816
exclude group: 'commons-logging', module: 'commons-logging'
}
testImplementation("org.springframework.boot:spring-boot-test:${springBootVersion}")
testImplementation("org.springframework.boot:spring-boot-starter-test:${springBootVersion}")
testImplementation("org.mockito:mockito-core:4.8.0")
testImplementation "org.springframework.security:spring-security-test:5.3.2.RELEASE"
testImplementation(
'org.junit.jupiter:junit-jupiter-api:5.2.0'
)
testRuntimeOnly(
'org.junit.jupiter:junit-jupiter-engine:5.2.0',
'org.junit.vintage:junit-vintage-engine:5.2.0'
)
}
task junitIntegrationTest(type: Test) {
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
}
test {
testLogging {
events "passed", "skipped", "failed"
}
reports {
junitXml.destination = new File("$rootProject.buildDir/test/results/xml")
junitXml.enabled = true
html.enabled = false
}
jacoco {
destinationFile = file("$rootProject.buildDir/test/coverage/work/${project.name}.exec")
}
useJUnitPlatform()
ignoreFailures = false
if (project.hasProperty("integration_tests")) {
include '**/integration/test/**'
} else if (project.hasProperty("performance_tests")) {
include '**/performance/test/**'
} else {
include '**/*TestSuite.*'
exclude '**/integration/test/**'
exclude '**/performance/test/**'
}
}
bootJar {
archiveFileName.set "application.jar"
mainClass = "com.abc.edocagentui.Application"
classifier "full"
manifest {
attributes "Bundle-Name": project.name
}
}
// 'dist' will basically compile and test
dist.dependsOn('build')
// 'integrationTest' will execute a Junit test that will run the integration tests
integrationTest.dependsOn('junitIntegrationTest')
Upvotes: 0
Views: 3662
Reputation: 124898
Judging from the amount of dependencies you are manually managing you have incompatible versions somewhere. Judging from the stacktrace it is due to the spring-data-redis
dependency. You should be using the spring-boot-starter-data-redis
dependency to get the proper and compatible version.
Further more I would suggest adding the io.spring.dependency-management
plugin, which makes managing the versions a lot easier.
plugins {
id 'java'
id 'idea'
id 'jacoco'
id 'org.springframework.boot" version "2.7.16'
id 'com.abc.ccs.gradle.plugin.docker" version "2.0'
id 'io.spring.dependency-management' version '1.0.15.RELEASE'
}
ext {
set('springCloudVersion', "2022.0.8")
set('springCloudAwsVersion', "3.0.0");
}
group "com.abc"
sourceCompatibility = 11
jacoco {
toolVersion = '0.8.5'
}
ccsDocker {
repositoryName = "microservices/edoc-agent-ui"
}
// Add integration test source sets
sourceSets {
integrationTest { sourceSet ->
["java", "groovy", "scala", "resources"].each {
if (!sourceSet.hasProperty(it)) return
sourceSet."$it".srcDir file("src/integrationTest/${it}")
}
}
}
configurations {
compile.exclude module: 'spring-boot-starter-tomcat'
}
dependencies {
implementation platform("org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}")
implementation platform("io.awspring.cloud:spring-cloud-aws-dependencies:${springCloudAwsVersion}")
implementation project(path: ":frontend", configuration: "output")
// Apache commons
implementation("org.apache.commons:commons-lang3:3.7")
// okhttpclient
implementation 'com.squareup.okhttp3:okhttp:3.12.3'
implementation 'com.squareup.okhttp3:logging-interceptor:3.12.3'
// Spring Boot
implementation("org.springframework.boot:spring-boot-starter-thymeleaf")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("org.springframework.boot:spring-boot-devtools")
implementation("org.springframework.boot:spring-boot-starter-security")
implementation("org.springframework.boot:spring-boot-starter-undertow")
implementation("org.springframework.boot:spring-boot-starter-validation")
implementation("org.springframework.boot:spring-boot-starter-json")
// Sleuth, we need to list the dependencies manually as it uses BOM
implementation "org.springframework.cloud:spring-cloud-starter-sleuth"
//pdf fonts
implementation("com.abc:pdfutils-fonts:1.0.4")
// Metrics
implementation 'org.springframework.cloud:spring-cloud-aws-autoconfigure'
implementation 'io.micrometer:micrometer-registry-cloudwatch:1.10.2'
//CCS Metrics filtering
implementation('com.abc:ccs-spring-metrics:1.2')
// abc Security utils
implementation("com.abc:ccs-security:1.0.24")
// feign
implementation("io.github.openfeign:feign-jackson:9.7.0")
implementation('io.github.openfeign:feign-okhttp:9.7.0')
implementation('io.github.openfeign:feign-slf4j:9.7.0')
implementation('io.github.openfeign.form:feign-form:3.3.0')
// swagger annotation, from java code copied from the edoc controller
implementation group: 'io.swagger', name: 'swagger-annotations', version: '1.5.0'
// spring sessions
implementation("org.springframework.session:spring-session-data-redis")
implementation("io.lettuce:lettuce-core:5.3.0.RELEASE")
// JWT
implementation("com.nimbusds:nimbus-jose-jwt:8.16")
// guava
implementation("com.google.guava:guava:25.1-jre")
// Apache libraries
implementation("commons-io:commons-io:2.6")
//logstash
implementation('net.logstash.logback:logstash-logback-encoder:7.2')
// aws
implementation("com.amazonaws:aws-java-sdk-s3")
implementation("com.amazonaws:aws-java-sdk-ssm"){
// https://github.com/spring-projects/spring-boot/issues/12816
exclude group: 'commons-logging', module: 'commons-logging'
}
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation "org.springframework.security:spring-security-test"
}
task junitIntegrationTest(type: Test) {
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
}
test {
testLogging {
events "passed", "skipped", "failed"
}
reports {
junitXml.destination = new File("$rootProject.buildDir/test/results/xml")
junitXml.enabled = true
html.enabled = false
}
jacoco {
destinationFile = file("$rootProject.buildDir/test/coverage/work/${project.name}.exec")
}
useJUnitPlatform()
ignoreFailures = false
if (project.hasProperty("integration_tests")) {
include '**/integration/test/**'
} else if (project.hasProperty("performance_tests")) {
include '**/performance/test/**'
} else {
include '**/*TestSuite.*'
exclude '**/integration/test/**'
exclude '**/performance/test/**'
}
}
bootJar {
archiveFileName.set "application.jar"
mainClass = "com.abc.edocagentui.Application"
classifier "full"
manifest {
attributes "Bundle-Name": project.name
}
}
// 'dist' will basically compile and test
dist.dependsOn('build')
// 'integrationTest' will execute a Junit test that will run the integration tests
integrationTest.dependsOn('junitIntegrationTest')
spring-session-data-redis
spring-boot-starter-web
, you can add spring-boot-starter-json
if you want to be explicit.spring-boot-starter-validation
instead to get a proper and compatible version.spring-boot-starter-test
already includes, mockito, JUnit Jupiter and Spring BOot Test support.spring-security-test
dependencyUpvotes: 0
Reputation: 606
I did not read your whole post but the exception stack trace says it:
Caused by: java.lang.ClassNotFoundException: org.springframework.data.repository.core.support.RepositoryMethodInvocationListener
You seem to miss that class. It seems to be part of spring data.
See: https://docs.spring.io/spring-data/commons/docs/current/api/org/springframework/data/repository/core/support/RepositoryMethodInvocationListener.html since version 2.4.0
Add the dependency spring data commons and it should work. Something like:
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-commons</artifactId>
</dependency>
Depending on your setup you might have to add a <version>...</version>
tag if you don't have the version defined somewhere in a parent...
Or as you are using gradle something like (use the right version):
implementation("org.springframework.data:spring-data-commons:2.4.0")
Upvotes: 0