Skip to content

RepositoryConfigurationExtensionSupport too strict in Spring Boot 4.0 #3966

@SledgeHammer01

Description

@SledgeHammer01

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions