Quarkus 进行本地镜像构建时遇到了 java.net.MalformedURLException错误

解决MalformedURLException异常

java.net.MalformedURLException: Accessing an URL protocol that was not enabled. The URL protocol https is supported but not enabled by default. It must be enabled by adding the --enable-url-protocols=https option to the native-image command.

这个问题出现之后比较让人想去直接对graalvm的plugin增加--enable-url-protocols=http 其实是错误的,你只需要在

quarkus的application.properties中增加quarkus.ssl.native=true 就可以了

再执行mvn clean -DskipTests package -Pnative 得到的可执行程序就可以访问https内容了

官方的解决办法在这:https://cn.quarkus.io/guides/native-and-ssl

# Java  quarkus 

评论

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×