Skip to content

Commit 52baaa3

Browse files
committed
Use graal metadata repository
- New version 0.1.1 now enabled in sample. - Remove hibernate validator hints as those are in metadata repo. - Relates #490
1 parent 310cbf8 commit 52baaa3

File tree

2 files changed

+6
-15
lines changed

2 files changed

+6
-15
lines changed

spring-shell-samples/spring-shell-samples.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ springBoot {
1616
buildInfo()
1717
}
1818

19+
graalvmNative {
20+
metadataRepository {
21+
version = "0.1.1"
22+
}
23+
}
24+
1925
// TODO: workaround until boot's aot plugin automatically extends
2026
// from all super configurations like graalvm's plugin does.
2127
configurations {

spring-shell-samples/src/main/java/org/springframework/shell/samples/config/SamplesRuntimeHints.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import org.springframework.aot.hint.RuntimeHints;
2626
import org.springframework.aot.hint.RuntimeHintsRegistrar;
2727
import org.springframework.aot.hint.TypeReference;
28-
import org.springframework.util.ClassUtils;
2928

3029
public class SamplesRuntimeHints implements RuntimeHintsRegistrar {
3130

@@ -58,20 +57,6 @@ public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
5857
"org.jline.terminal.impl.jna.win.Kernel32$FOCUS_EVENT_RECORD",
5958
"org.jline.terminal.impl.jna.win.Kernel32$SMALL_RECT",
6059
"org.jline.terminal.impl.jna.win.Kernel32$UnionChar");
61-
// from spring-native sb-3.0.x branch
62-
registerHibernateValidatorHints(hints, classLoader);
63-
}
64-
65-
private void registerHibernateValidatorHints(RuntimeHints hints, ClassLoader classLoader) {
66-
if (!ClassUtils.isPresent("org.hibernate.validator.HibernateValidator", classLoader)) {
67-
return;
68-
}
69-
hints.reflection().registerType(TypeReference.of("org.hibernate.validator.internal.util.logging.Log_$logger"),
70-
hint -> hint.withMembers(MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS));
71-
hints.reflection().registerType(
72-
TypeReference.of("org.hibernate.validator.internal.util.logging.Messages_$bundle"),
73-
hint -> hint.withField("INSTANCE", fieldHint -> {
74-
}));
7560
}
7661

7762
private void registerResources(ResourceHints resource) {

0 commit comments

Comments
 (0)