oracle / graalvm-reachability-metadata

Repository which contains community-driven collection of GraalVM reachability metadata for open-source libraries.
Creative Commons Zero v1.0 Universal
368 stars 89 forks source link

Add support for [com.baomidou:mybatis-plus-boot-starter:jar:3.5.3.1] #159

Open fushun1990 opened 1 year ago

fushun1990 commented 1 year ago

Describe the problem ` Exception in thread "main" org.springframework.boot.context.properties.bind.MissingParametersCompilerArgumentException: Constructor binding in a native image requires compilation with -parameters but the following classes were compiled without it: org.apache.ibatis.builder.CacheRefResolver org.apache.ibatis.parsing.XNode org.apache.ibatis.builder.annotation.MethodResolver org.apache.ibatis.builder.ResultMapResolver org.apache.ibatis.mapping.ResultFlag

    at org.springframework.boot.context.properties.bind.BindableRuntimeHintsRegistrar.registerHints(BindableRuntimeHintsRegistrar.java:87)
    at org.springframework.boot.context.properties.ConfigurationPropertiesBeanFactoryInitializationAotProcessor$ConfigurationPropertiesReflectionHintsContribution.applyTo(ConfigurationPropertiesBeanFactoryInitializationAotProcessor.java:70)
    at org.springframework.context.aot.BeanFactoryInitializationAotContributions.applyTo(BeanFactoryInitializationAotContributions.java:78)
    at org.springframework.context.aot.ApplicationContextAotGenerator.lambda$processAheadOfTime$0(ApplicationContextAotGenerator.java:58)
    at org.springframework.context.aot.ApplicationContextAotGenerator.withCglibClassHandler(ApplicationContextAotGenerator.java:67)
    at org.springframework.context.aot.ApplicationContextAotGenerator.processAheadOfTime(ApplicationContextAotGenerator.java:53)
    at org.springframework.context.aot.ContextAotProcessor.performAotProcessing(ContextAotProcessor.java:106)
    at org.springframework.context.aot.ContextAotProcessor.doProcess(ContextAotProcessor.java:84)
    at org.springframework.context.aot.ContextAotProcessor.doProcess(ContextAotProcessor.java:49)
    at org.springframework.context.aot.AbstractAotProcessor.process(AbstractAotProcessor.java:82)
    at org.springframework.boot.SpringApplicationAotProcessor.main(SpringApplicationAotProcessor.java:76)

`

Additional context Add any other context about the problem here.

System Info (please complete the following information):

To Reproduce demo 2.zip

wilkinsona commented 1 year ago

I don't think this can be fixed with reachability metadata. The problem will need to be addressed in the code that's attempting to bind configuration properties directly to ibatis classes. Presumably that code is part of mybatis-plus-boot-starter.

sdeleuze commented 1 year ago

@dnestoro I think you can close this issue.

fushun1990 commented 1 year ago

ok, 但是能否给我一些意见,我应该怎么进行修改才可以解决这个问题了。或者是否有相似问题的解决方案我做参考。 我没有找到相关是学习文档和解决方案。谢谢!!

以上文字是中文翻译的。抱歉

ok But could you please give me some advice on how I should modify to solve this problem? Or whether there are solutions to similar problems for my reference. I did not find the relevant documentation and solution. Thank you!!

The above text is translated from Chinese. Sorry

linghengqian commented 1 year ago

@fushun1990