解决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