question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[FEATURE REQ] Migrate Spring Cloud Azure Native Configuration to Spring Framework 6 hints

See original GitHub issue

Spring 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:open
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
sdeleuzecommented, Sep 20, 2022

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 via RuntimeHintsRegistrar implementations + their META-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.

1reaction
sdeleuzecommented, Nov 8, 2022

Hi, you can take advantage of RuntimeHintsPredicates, see for example an example of such test in TomcatWebServerRuntimeHintsTests.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Migrate Spring Cloud applications to Azure Spring Apps
This guide describes what you should be aware of when you want to migrate an existing Spring Cloud application to run on Azure...
Read more >
Spring Cloud Azure developer guide | Microsoft Learn
This article provides developer guidance for Spring Cloud Azure ... For more information on migrating to 4.0, see Migration guide for 4.0.
Read more >
Migrate Spring Boot applications to Azure Spring Apps
This guide describes what you should be aware of when you want to migrate an existing Spring Boot application to run on Azure...
Read more >
Migrate Spring Boot applications to Azure App Service
This guide describes what you should be aware of when you want to migrate an existing Spring Boot application to Azure App Service....
Read more >
Azure Spring Cloud: a fully managed service for Spring Boot ...
Java developers in many organizations have used the service and provided us with plenty of feedback to prioritize features to help shape Azure...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found