I'm working on a Spring Boot Starter for Hibernate Reactive. All works fine.
With Spring Boot 4.0 M1 (worked fine in Spring Boot 3.5.x), a client application no longer works because of this check in RepositoryConfigurationExtensionSupport.java:
protected boolean useRepositoryConfiguration(RepositoryMetadata metadata) {
if (metadata.isReactiveRepository()) {
throw new InvalidDataAccessApiUsageException(
String.format("Reactive Repositories are not supported by %s; Offending repository is %s", getModuleName(),
metadata.getRepositoryInterface().getName()));
}
return true;
}
The application includes spring-boot-starter-webflux
, the starter does include:
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
</dependency>
But Spring Data Jpa is required because that is where Specification lives for example.
YES, I am overriding protected boolean useRepositoryConfiguration(RepositoryMetadata metadata)
in my custom config extension, however, JpaRepositoryConfigExtension
ALSO gets run and that's the one throwing the exception.
Since JpaRepositoryConfigExtension
lives in spring-data-jpa
, there doesn't seem to be any way to prevent that from running.