Skip to content

Commit dc3c46b

Browse files
committed
Add documentation.
1 parent 886a97c commit dc3c46b

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

docs/modules/ROOT/pages/server/aot-and-native-image-support.adoc

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,28 @@
22
= AOT and Native Image Support
33
:page-section-summary-toc: 1
44

5-
Since `4.0.0`, Spring Cloud Config Server supports Spring AOT transformations. However, for the time being, GraalVM native images are not supported. Implementing native image support is blocked by https://github.com/oracle/graal/issues/5134[graal#5134] and will likely require the completion of the work on https://github.com/graalvm/taming-build-time-initialization[https://github.com/graalvm/taming-build-time-initialization] to be fixed.
5+
Since `4.0.0`, Spring Cloud Config Server supports Spring AOT transformations. As of `4.1.0` it also supports GraalVM native images.
6+
7+
====
8+
9+
IMPORTANT::
10+
Since handling `FileSystemProvider` has not yet been properly addressed in Graal (https://github.com/oracle/graal/issues/5134[graal#5134], will likely require the completion of the work on https://github.com/graalvm/taming-build-time-initialization[https://github.com/graalvm/taming-build-time-initialization] to be fixed), workaround config has to be added. If you want to run Config Server as a native image, you'll need to add the following options to your GraalVM build plugin setup (please refer to https://www.graalvm.org/[GraalVM] Maven or Gradle plugin documentation for more details):
11+
12+
[source,indent=0]
13+
----
14+
-H:-AddAllFileSystemProviders
15+
--strict-image-heap
16+
--initialize-at-build-time=org.bouncycastle
17+
--initialize-at-build-time=net.i2p.crypto.eddsa.EdDSASecurityProvider
18+
--initialize-at-run-time=org.bouncycastle.jcajce.provider.drbg.DRBG$Default
19+
--initialize-at-run-time=org.bouncycastle.jcajce.provider.drbg.DRBG$NonceAndIV
20+
----
21+
22+
23+
====
24+
25+
TIP::
26+
If you are connecting with your config data backend over SSH, keep in mind that GraalVM requires https://www.graalvm.org/latest/reference-manual/native-image/dynamic-features/JCASecurityServices/#provider-registration[security provider registration using `java.security`]
27+
28+
WARNING: Refresh scope is not supported with native images. If you are going to run your config client application as a native image, make sure to set `spring.cloud.refresh.enabled` property to `false`.
629

0 commit comments

Comments
 (0)