如何使用 Java 在 High Server Http Akka 中加载二级路由?

How can i load two level routing in High Server Http Akka using Java?

我正在尝试使用 akka HttpJava

我想加载如下所示的路线: hello/world

在我的 HttpApp 上,我试过:

return route(
                path("hello/world", () ->
                        get(() ->
                                complete("<h1>Say hello to akka-http</h1>")
                        )
                );

根据 docs.

尝试以下操作
import static akka.http.javadsl.server.PathMatchers.*;

return route(
  path(segment("hello").slash(segment("world")), () ->
    get(() ->
     complete("<h1>Say hello to akka-http</h1>")
    )
);