spring-attic / spring-native

Spring Native is now superseded by Spring Boot 3 official native support
https://docs.spring.io/spring-boot/docs/current/reference/html/native-image.html
Apache License 2.0
2.74k stars 356 forks source link

Jvm parametes (have set via System.setProperty()) doesn't work #1716

Closed Losishche closed 1 year ago

Losishche commented 1 year ago

Hello, team! I have an ordinary java spring application and spring native version of that one. In ordinary java app i set up https proxy via JVM startup parameter like this: $JAVA_OPTS -Dhttps.proxyHost=someProxyHost. This possibility describes here https://docs.oracle.com/javase/8/docs/technotes/guides/net/proxies.html But setting up same parameter to native binary file doesn't work.

I have tried to set up this property via System.setProperty() inside configuration class. But it doesn't affect http's requests as well.

Please get more information about setting up this proxy mechanism in graal's spring native apps.

Thanks in advance!

Losishche commented 1 year ago

Unactual. Problem with concrete reactor's httpClient (which is used at the project) solved by invoking it's method .proxyWithSystemProperties() (so it was issue of httpClient, not of Graal compiler). Properties successfuly changed by setting up System.setProperty() inside configuration class.