In fastjar mode, it is not possible to add a custom URLStreamHandler using the environment variable java.protocol.handler.pkgs
I have implemented a URLStreamHandler to handle my custom protocol, let's assume it's called "myprotocol". It works properly when I start the application in the IDE, but fails to function correctly after I package it using the spring-boot-maven-plugin. The reason is that when loading the protocol's Handler, Java uses the SystemClassLoader, but the SystemClassLoader cannot load the classes I wrote in Spring Boot's fatjar. For the same reason, the URLStreamHandlerProvider also fails to load them.