From 2b76a12b86a62cc46886e1b7f0e52ea9d256f899 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deleuze?= Date: Fri, 3 Jun 2022 17:18:41 +0200 Subject: [PATCH] Refine build time init configuration For Spring MVC and RestTemplate. See gh-28518 --- .../org.springframework/spring-core/native-image.properties | 5 ++++- .../org.springframework/spring-web/native-image.properties | 3 ++- .../spring-webmvc/native-image.properties | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 spring-webmvc/src/main/resources/META-INF/native-image/org.springframework/spring-webmvc/native-image.properties diff --git a/spring-core/src/main/resources/META-INF/native-image/org.springframework/spring-core/native-image.properties b/spring-core/src/main/resources/META-INF/native-image/org.springframework/spring-core/native-image.properties index 4bab1cc0d05..6bb35ccfdb7 100644 --- a/spring-core/src/main/resources/META-INF/native-image/org.springframework/spring-core/native-image.properties +++ b/spring-core/src/main/resources/META-INF/native-image/org.springframework/spring-core/native-image.properties @@ -1,2 +1,5 @@ Args = --initialize-at-build-time=org.springframework.aot.AotDetector,\ -org.springframework.core.NativeDetector +org.springframework.core.NativeDetector,\ +org.springframework.util.ConcurrentReferenceHashMap,\ +org.springframework.core.SpringProperties,\ +org.springframework.util.ClassUtils diff --git a/spring-web/src/main/resources/META-INF/native-image/org.springframework/spring-web/native-image.properties b/spring-web/src/main/resources/META-INF/native-image/org.springframework/spring-web/native-image.properties index bcc0e66ab10..77c8057c5ac 100644 --- a/spring-web/src/main/resources/META-INF/native-image/org.springframework/spring-web/native-image.properties +++ b/spring-web/src/main/resources/META-INF/native-image/org.springframework/spring-web/native-image.properties @@ -1 +1,2 @@ -Args = --initialize-at-build-time=org.springframework.http.HttpStatus +Args = --initialize-at-build-time=org.springframework.http.HttpStatus,\ +org.springframework.web.client.RestTemplate diff --git a/spring-webmvc/src/main/resources/META-INF/native-image/org.springframework/spring-webmvc/native-image.properties b/spring-webmvc/src/main/resources/META-INF/native-image/org.springframework/spring-webmvc/native-image.properties new file mode 100644 index 00000000000..6e63da6d955 --- /dev/null +++ b/spring-webmvc/src/main/resources/META-INF/native-image/org.springframework/spring-webmvc/native-image.properties @@ -0,0 +1 @@ +Args = --initialize-at-build-time=org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport