Affects: \
I have encountered an issue and I'm not sure if it's caused by Spring or GraalVM.
@Configuration(proxyBeanMethods = false)
@Slf4j
public class TomcatAutoConfiguration {
@Bean
public WebServerFactoryCustomizer<TomcatServletWebServerFactory> webServerFactoryCustomizer(ServerProperties serverProperties) {
return factory -> {
if (serverProperties.getUseUnixSocket()) {
String os = System.getProperty("os.name").toLowerCase();
if (os.contains("nix") || os.contains("nux") || os.contains("aix")) {
log.info("Unix system,use Unix socket");
factory.addConnectorCustomizers(connector -> connector.setProperty("unixDomainSocketPath", serverProperties.getSocketFile()));
}
}
};
}
}
The code above, when run using java -jar
, will listen to a socket at the specified file path. However, after building it using native, the code still runs normally, but it actually listens to a port instead of a Unix socket file.
Comment From: sdeleuze
It does not look like a Spring Framework issue, and looks more suitable for a https://stackoverflow.com question. You can also go on the GraalVM Slack with a reproducer.