要使用支持 http2 的插件:solon.boot.undertow (目前,只有它支持),然后通过代码启用:

@SolonMain
public class SeverDemo {
    public static void main(String[] args) {
        Solon.start(SeverDemo.class, args, app -> {
            app.onEvent(HttpServerConfigure.class, e -> {
                //通过事件,启用 http2
                e.enableHttp2(true); 
            });
        });
    }
}