[FEATURE REQ] Migrate Spring Cloud Azure Native Configuration to Spring Framework 6 hints
See original GitHub issueSpring Native, the experimental native support project for Spring Boot 2.x applications that I lead, will be replaced by Spring Boot 3 official native support once released November 24th.
Spring Cloud Azure Native Configuration currently leverages Spring Native hint annotations like @NativeHint
, @TypeHint
, etc. I propose to replace it by Spring Framework 6 and Spring Boot 3 hints.
We have not yet written the documentation, but you should be able to leverage Spring Framework 6.0.0-M6
and add RuntimeHintsRegistrar
implementations that allows to register hints via a programmatic API. You can take inspiration of existing implementations provided with Spring Framework. Those implementation are discovered via META-INF/spring/aot.factories
resource files like this one.
You can add basic tests on JVM side like this. We are also in the process of adding native test support which can be useful for proper integration testing but that can comes later IMO.
Happy to provide guidance and help for that migration.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
You could indeed remove https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring-experimental/spring-cloud-azure-native-configuration which lives in
spring-experimental
and instead add Spring Boot 3 native support viaRuntimeHintsRegistrar
implementations + theirMETA-INF/spring/aot.factories
counterparts in https://github.com/Azure/azure-sdk-for-java/tree/feature/spring-cloud-azure-6.x/sdk/spring.When Spring Framework 6 and Spring Boot 3 will be GA (late november), Spring Native users will be asked to migrate to those official release so there won’t be a need to support it anymore.
Hi, you can take advantage of
RuntimeHintsPredicates
, see for example an example of such test inTomcatWebServerRuntimeHintsTests
.