0
Caused by: com.oracle.svm.core.jdk.UnsupportedFeatureError: Proxy class defined by interfaces [interface io.github.llnancy.dailyhot.client.BaiduExchangeClient, interface org.springframework.aop.SpringProxy, interface org.springframework.aop.framework.Advised, interface org.springframework.core.DecoratingProxy] not found. Generating proxy classes at runtime is not supported. Proxy classes need to be defined at image build time by specifying the list of interfaces that they implement. To define proxy classes use -H:DynamicProxyConfigurationFiles=<comma-separated-config-files> and -H:DynamicProxyConfigurationResources=<comma-separated-config-resources> options.
        at org.graalvm.nativeimage.builder/com.oracle.svm.core.util.VMError.unsupportedFeature(VMError.java:89) ~[na:na]
        at org.graalvm.nativeimage.builder/com.oracle.svm.core.reflect.proxy.DynamicProxySupport.getProxyClass(DynamicProxySupport.java:171) ~[na:na]

I defined an annotation @ExchangeClient and a FactoryBean, which is used to create instance objects of the class marked by the annotation. Everything runs normally locally, but after running as a native image, the above error occurs. I refer to the aot code of MapperFactoryBean of mybatis https://github.com/mybatis/spring-boot-starter/wiki/MyBatisNativeConfiguration.java

native image run success

0 Answers0