mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-10-19 06:16:01 +00:00
fix[graalvm]: netty graalvm
This commit is contained in:
1 parent
f14488cdc8
commit
08e03d6ac9
1 file changed
+6
-1
@@ -26,6 +26,8 @@ import org.springframework.aot.hint.RuntimeHintsRegistrar;
|
|||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import static org.springframework.aot.hint.MemberCategory.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register runtime hints for the token library
|
* Register runtime hints for the token library
|
||||||
*
|
*
|
||||||
@@ -50,7 +52,10 @@ public class GraalvmProtocolHints implements RuntimeHintsRegistrar {
|
|||||||
HintUtils.registerRelevantClasses(hints, classes);
|
HintUtils.registerRelevantClasses(hints, classes);
|
||||||
|
|
||||||
// netty
|
// netty
|
||||||
HintUtils.registerClasses(hints, List.of(AbstractByteBufAllocator.class, AbstractReferenceCountedByteBuf.class));
|
var nettyClassList = List.of(AbstractByteBufAllocator.class, AbstractReferenceCountedByteBuf.class);
|
||||||
|
for(var clazz : nettyClassList) {
|
||||||
|
hints.reflection().registerType(clazz, DECLARED_FIELDS, INVOKE_PUBLIC_CONSTRUCTORS, INVOKE_DECLARED_METHODS);
|
||||||
|
}
|
||||||
|
|
||||||
var include = "*.protocol";
|
var include = "*.protocol";
|
||||||
hints.resources().registerPattern(include);
|
hints.resources().registerPattern(include);
|
||||||
|
|||||||
Reference in new issue
Block a user