Skip to content

Commit

Permalink
Fix OTel Spring starter native test (#10305)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanbisutti authored Jan 23, 2024
1 parent 02af801 commit e904d1d
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
package io.opentelemetry.spring.smoketest;

import org.springframework.aot.hint.RuntimeHintsRegistrar;
import org.springframework.aot.hint.TypeReference;
import org.springframework.data.web.config.SpringDataJacksonConfiguration;

// Necessary for GraalVM native test
public class RuntimeHints implements RuntimeHintsRegistrar {
Expand All @@ -14,5 +16,15 @@ public class RuntimeHints implements RuntimeHintsRegistrar {
public void registerHints(
org.springframework.aot.hint.RuntimeHints hints, ClassLoader classLoader) {
hints.resources().registerResourceBundle("org.apache.commons.dbcp2.LocalStrings");

// To remove from Spring Boot 3.2.3 release:
// https://github.com/spring-projects/spring-data-commons/issues/3025
hints
.reflection()
.registerType(
TypeReference.of("org.springframework.data.domain.Unpaged"),
hint -> {
hint.onReachableType(SpringDataJacksonConfiguration.PageModule.class);
});
}
}

0 comments on commit e904d1d

Please sign in to comment.