Skip to content

Replacing spring.factories auto-configuration setup with new file as stated per Spring Boot 2.7 release notes #468

@jeroenkruis

Description

@jeroenkruis

Proposal:
From Spring Boot version 2.7 (or greater) it's recommended to move auto configuration from the spring.factories file to a new file: META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports. See the following release notes: https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.7-Release-Notes#changes-to-auto-configuration

Current behavior:
When using version 3.0.0-M5 or 3.0.0-RC2 of the spring-boot-starter-parent the InfluxDB2AutoConfiguration class is not automatically auto-configured. I have to do this myself now instead of letting Spring do it for me.

Desired behavior:
When using the new auto configuration file as described in the release notes the InfluxDB2AutoConfiguration will be auto configured as usual and I don't have to this manually. (pre 3.0.0-M5 behavior)

Alternatives considered:
A workaround is to use @Import annotation on the InfluxDB2AutoConfiguration class or to create the new file stated in the proposal section in your own Spring Boot application.

Use case:
Upgrading to a newer Spring Boot version might give users of the influxdb spring client the impression something else is wrong or "just doesn't work out of the box" experience.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions