alibaba / jetcache

JetCache is a Java cache framework.
Apache License 2.0
5.14k stars 1.06k forks source link

AOT error: autoConfigureBeans has private access in RedisAutoInit #666

Open ymind opened 2 years ago

ymind commented 2 years ago

https://github.com/alibaba/jetcache/blob/5700e51b1a0e0f3fab0be20a58647764cae6807c/jetcache-starter/jetcache-autoconfigure/src/main/java/com/alicp/jetcache/autoconfigure/RedisAutoConfiguration.java#L61

在试图将项目改造为AOT时遇到错误,可能与上述字段设置为private有关:

E:\work\...\build\generated\runtimeSources\aotMain\com\alicp\jetcache\autoconfigure\ContextBootstrapInitializer.java:18: error: autoConfigureBeans has private access in RedisAutoInit
                      .invoke(beanFactory, (attributes) -> bean.autoConfigureBeans = attributes.get(0));
                                                               ^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error

其他信息: spring boot: id("org.springframework.boot") version "2.6.7" aot plugin: id("org.springframework.experimental.aot") version "0.11.5"

复现途径: 根据下述文档搭建项目,引入jetcache后即可复现错误。 spring native: https://docs.spring.io/spring-native/docs/current/reference/htmlsingle/

areyouok commented 2 years ago

AOT会有很多限制,恐怕不只是这一个lib有问题。我先看一看。