Azure / Azure/azure-sdk-for-java
[BUG] Need manually register the AzureGlobalProperties bean when using Spring Native
- Dominant language
- Java
- Stars
- 2.6k
- Forks
- 2.2k
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 178
Description
**Describe the bug**
When using Spring native with Spring Cloud Azure, need manually register the `AzureGlobalProperties` bean. See No.4 in https://github.com/Azure/azure-sdk-for-java/issues/43563#issuecomment-2609040842
***Exception or Stack Trace***
Fail to start if not register a `AzureGlobalProperties` bean
**To Reproduce**
Steps to reproduce the behavior:
1. clone https://github.com/Netyyyy/azure-key-vault-native
2. remove `AzureGlobalProperties` bean
3. Build the project to native using: `./gradlew clean nativeCompile`
4. Run the built application `./build/native/nativeCompile/azure-key-vault-native`
**Expected behavior**
Not to register `AzureGlobalProperties` bean
If you suspect a dependency version mismatch (e.g. you see `NoClassDefFoundError`, `NoSuchMethodError` or similar), please check out [Troubleshoot dependency version conflict article](https://aka.ms/azsdk/java/dependency/troubleshoot) first. If it doesn't provide solution for the problem, please provide:
- verbose dependency tree (`mvn dependency:tree -Dverbose`)
- exception message, full stack trace, and any available logs
**Additional context**
Add any other context about the problem here.
**Information Checklist**
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
- [ ] Bug Description Added
- [ ] Repro Steps Added
- [ ] Setup information Added
Contributor guide
Assessment
This issue has not been assessed yet.