Describe the bug
Spring Cloud: 2024.0.0-M1 (Spring Boot 3.4.0-SNAPSHOT)
Running the application that embeds the eureka-client works fine, but there's an error during shutdown
2024-09-24 21:21:11 WARN 29634 --- [gateway] [ionShutdownHook] [ ] o.s.b.f.support.DisposableBeanAdapter : Failed to invoke custom destroy method 'shutdown' on bean with name 'eurekaClient'
org.graalvm.nativeimage.MissingReflectionRegistrationError: The program tried to reflectively invoke method public synchronized void com.netflix.discovery.DiscoveryClient.shutdown() without it being registered for runtime reflection. Add public synchronized void com.netflix.discovery.DiscoveryClient.shutdown() to the reflection metadata to solve this problem. See https://www.graalvm.org/latest/reference-manual/native-image/metadata/#reflection for help.
at org.graalvm.nativeimage.builder/com.oracle.svm.core.reflect.MissingReflectionRegistrationUtils.forQueriedOnlyExecutable(MissingReflectionRegistrationUtils.java:72) ~[na:na]
at java.base@21.0.4/java.lang.reflect.Method.acquireMethodAccessor(Method.java:77) ~[gateway:na]
at java.base@21.0.4/java.lang.reflect.Method.invoke(Method.java:577) ~[gateway:na]
at org.springframework.beans.factory.support.DisposableBeanAdapter.invokeCustomDestroyMethod(DisposableBeanAdapter.ja
Comment From: OlgaMaciaszek
Hi @krezovic, thanks for bringing this up. Will add missing hints.