如何在 Spring Boot 或 Quarkus 中的 Apache Camel 中配置区分大小写的路径?

问题描述 投票:0回答:0

目前我正在将一些项目集成到 Quarkus 和 Spring Boot 中,它们都使用 Apache Camel 来构建 Rest API,但我遇到了一个罕见的问题。在 Spring Boot 中,请求似乎不区分大小写,但在 Quarkus 中是,那么如何在其中任何一个中配置区分大小写? 我正在使用以下代码进行测试

public class RestService extends RouteBuilder {
@Override
public void configure() throws Exception {

    restConfiguration()
            .port("8080")
            .apiProperty("cors","true");

    rest("/say")
            .get("/hello").to("direct:hello");

    from("direct:hello").routeId("hello")
            .log("Request arrived")
            .transform().constant("Hello world from Spring Boot");


     }
}

我尝试将 matchOnUriPrefix 设置为 true 和 false,但这似乎没有任何影响

rest apache-camel quarkus case-sensitive spring-camel
© www.soinside.com 2019 - 2024. All rights reserved.