All Downloads are FREE. Search and download functionalities are using the official Maven repository.

templates.graphql.handlerProvider.rocker.raw Maven / Gradle / Ivy

@import java.util.Map
@import java.util.List
@args (String rootPackage, String handlerPackage, List> items)
package @rootPackage;

import com.networknt.config.Config;
import com.networknt.handler.HandlerProvider;
import io.undertow.Handlers;
import io.undertow.server.HttpHandler;
import io.undertow.server.HttpServerExchange;
import io.undertow.util.Methods;
import com.networknt.info.ServerInfoGetHandler;
import @with (p = handlerPackage + ".*;") {@p}

public class PathHandlerProvider implements HandlerProvider {
    @@Override
    public HttpHandler getHandler() {
        return Handlers.routing()
        @for(item: items) {
            .add([email protected]("method"), "@item.get("path")", new @item.get("handlerName")())
        }
        ;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy