spring-attic / spring-native

Spring Native is now superseded by Spring Boot 3 official native support

Home Page:https://docs.spring.io/spring-boot/docs/current/reference/html/native-image.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compilation fails with @EnableCaching annotation

agrancaric opened this issue · comments

Hello, I've seen there is an issue to introduce initial caching support (#465) but I don't see this problem mentioned there so I am opening a new issue. When adding spring-boot-cache-starter and ehcache (didn't try other implementations) the task bootBuildImage fails with the following error:

/Users/agrancaric/Projects/tmp/spring-native-cache-example/build/generated/runtimeSources/aotMain/org/springframework/cache/annotation/ContextBootstrapInitializer.java:24: error: cannot find symbol .invoke(beanFactory, (attributes) -> bean.setConfigurers(attributes.get(0))); ^ symbol: method setConfigurers(Object) location: variable bean of type ProxyJCacheConfiguration

Version info: 'GraalVM 22.2.0 Java 11 CE'
Java version info: '11.0.16.1+1-LTS'

The project for reproducing the issue is here:

spring-native-cache-example.zip

Caching on native is supported on Spring Boot 3 snapshots and related milestone, it will shortly take the relay of Spring Native experimental project.

I suggest you add a comment on spring-projects/spring-aot-smoke-tests#40 asking for a cache-ehache sample.