cc.shacocloud.mirage.web.util.RoutingContextUtils Maven / Gradle / Ivy
package cc.shacocloud.mirage.web.util;
import cc.shacocloud.mirage.web.RoutingContext;
import cc.shacocloud.mirage.web.VertXRoutingContextImpl;
public class RoutingContextUtils {
/**
* 创建{@link RoutingContext},并且添加到 {@link io.vertx.ext.web.RoutingContext} 中进行传递
*/
public static RoutingContext createVertXRoutingContext(io.vertx.ext.web.RoutingContext ctx) {
RoutingContext routingContext = ctx.get(RoutingContext.class.getName());
if (routingContext == null) {
ctx.put(RoutingContext.class.getName(), (routingContext = new VertXRoutingContextImpl(ctx)));
}
return routingContext;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy