jetcache icon indicating copy to clipboard operation
jetcache copied to clipboard

AOT error: autoConfigureBeans has private access in RedisAutoInit

Open ymind opened this issue 2 years ago • 1 comments

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/

ymind avatar May 21 '22 00:05 ymind

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

areyouok avatar May 21 '22 03:05 areyouok