aerospike-community / spring-data-aerospike-starters

spring-data-aerospike-starters
https://github.com/aerospike-community/spring-data-aerospike
15 stars 7 forks source link

Support Spring Boot 3 autoconfiguration #171

Closed solomkinmv closed 1 year ago

solomkinmv commented 1 year ago

Since Spring Boot 3 autoconfigurations should be specified in META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports instead of spring.factories. https://docs.spring.io/spring-boot/docs/3.0.2-SNAPSHOT/reference/htmlsingle/#features.developing-auto-configuration.understanding-auto-configured-beans

This PR should add support for autoconfigurations with Spring Boot 3. Without this autoconfigurations are not detected by Spring.

Tried to run this with changes from https://github.com/aerospike-community/spring-data-aerospike-starters/pull/168, but there are some changes that affect tests.

solomkinmv commented 1 year ago

Updated code to support Spring Boot 3. Also updated JDK version since Spring Boot 3 is based on JDK 17.

solomkinmv commented 1 year ago

This change requires Spring Boot 3 support in Spring Data Aerospike.

@reugn example project from this repository works fine. Even so, what about merging at least part with autoconfiguration discovery?

solomkinmv commented 1 year ago

@reugn @roimenashe any ideas how to proceed with this PR? Do you want me to split it in 2 different ones?

  1. Autoconfigurations via AutoConfiguration.imports
  2. Update Spring Boot to v3
reugn commented 1 year ago

@solomkinmv we plan to upgrade the Spring Data library to v3 in the future. Once we update, your PR is good to go. The switch to the AutoConfiguration annotation by itself doesn't add much, so it's not worth splitting.