提交 6a225e55 编写于 作者: 如梦技术's avatar 如梦技术 🐛

完善 spring-native 支持 #38 #I3PX2N

上级 5e8015c4
......@@ -34,6 +34,7 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.lang.Nullable;
import org.springframework.nativex.hint.AccessBits;
import org.springframework.nativex.hint.FieldHint;
import org.springframework.nativex.hint.NativeHint;
import org.springframework.nativex.hint.TypeHint;
import org.springframework.util.CollectionUtils;
......@@ -53,7 +54,12 @@ import java.util.stream.Collectors;
@ConditionalOnMissingBean(CacheManager.class)
@ConditionalOnClass({Caffeine.class, CaffeineCacheManager.class})
@AutoConfigureBefore(name = "org.springframework.boot.autoconfigure.cache.CaffeineCacheConfiguration")
@NativeHint(types = @TypeHint(types = CaffeineAutoCacheManager.class, access = AccessBits.ALL))
@NativeHint(types = {
@TypeHint(types = CaffeineAutoCacheManager.class, access = AccessBits.ALL),
@TypeHint(types = CaffeineCacheManager.class, access = AccessBits.ALL),
@TypeHint(typeNames = "com.github.benmanes.caffeine.cache.SSA", access = AccessBits.ALL),
@TypeHint(typeNames = "com.github.benmanes.caffeine.cache.UnsafeAccess", fields = @FieldHint(name = "UNSAFE", allowUnsafeAccess = true), access = AccessBits.PUBLIC_METHODS)
})
public class CaffeineAutoCacheConfiguration {
@Bean
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册