243.3. Spring Boot Auto-Configuration
组件支持 33 选项,如下所示。
名称 | 描述 | 默认 | 类型 |
---|---|---|---|
camel.component.netty4-http.configuration.allow-default-codec | 布尔值 | ||
camel.component.netty4-http.configuration.bridge-endpoint | 如果 选项为 true,则制作者将忽略 Exchange.HTTP_URI 标头,并使用端点的 URI 进行请求。您也可以将 throwExceptionOnFailure 设置为 false,以便制作者将所有故障响应发送回送。在网桥模式中工作的使用者将跳过 gzip 压缩和 WWW URL 表单编码(通过添加 Exchange.SKIP_GZIP_ENCODING 和 Exchange.SKIP_WWW_FORM_URLENCODED 标头到被使用的交换)。 | false | 布尔值 |
camel.component.netty4-http.configuration.chunked-max-content-length | 该值以字节为单位,以字节在 Netty HTTP 服务器上接收的每个块帧的最大内容长度。 | 1048576 | 整数 |
camel.component.netty4-http.configuration.compression | 如果客户端支持来自 HTTP 标头的,则允许使用 gzip/defdef 进行 Netty HTTP 服务器上的压缩。 | false | 布尔值 |
camel.component.netty4-http.configuration.disable-stream-cache | 确定 Netty HttpRequest#getContent ()或 HttpResponset#getContent ()的原始输入流是否已缓存(Camel 将把流读到以轻量级内存流缓存)缓存中。默认情况下,Camel 将缓存 Netty 输入流,以支持多次读取,以确保 Camel 可以从流检索所有数据。但是,当您需要访问原始流(如直接流传输到文件或其他持久性存储)时,您可以将这个选项设置为 true。请记住,如果启用这个选项,则不能多次读取 Netty 流,而且您需要手动在 Netty 原始流中重置 reader 索引。另外,当 Netty HTTP 服务器/HTTP 客户端处理时,Netty 将自动关闭 Netty 流,这意味着如果异步路由引擎正在使用,则可能会继续路由 org.apache.camel.Exchange 无法读取 Netty 流,因为 Netty 已关闭它。 | false | 布尔值 |
camel.component.netty4-http.configuration.host | 当消费者时,本地主机名(如 localhost 或 0.0.0.0)使用制作者时的远程 HTTP 服务器主机名。 | 字符串 | |
camel.component.netty4-http.configuration.map-headers | 如果启用了这个选项,则当从 Netty 绑定到 Camel 消息时,将映射标头(如作为标头添加到 Camel 消息)。您可以关闭这个选项来禁用这个选项。该标头仍然可以从 org.apache.camel.component.netty.http.NettyHttpMessage 消息访问,方法为 Netty HTTP 请求 io.netty.handler.codec.http.HttpRequest 实例。 | true | 布尔值 |
camel.component.netty4-http.configuration.match-on-uri-prefix | 如果找不到任何匹配项,Camel 应该尝试通过匹配 URI 前缀来查找目标使用者。 | false | 布尔值 |
camel.component.netty4-http.configuration.max-header-size | 所有标头的最大长度。如果每个标头的长度的总和超过这个值,则将引发 io.netty.handler.codec.TooLongFrameException。 | 8192 | 整数 |
camel.component.netty4-http.configuration.ok-status-code-range | 被视为成功响应的状态代码。值包括:可以定义多个范围,以逗号分隔,例如 200-204,209,301-304。每个范围必须是单个数字,或使用包括横线的短划线。默认范围为 200-299 | 200-299 | 字符串 |
camel.component.netty4-http.configuration.path | 资源路径 | 字符串 | |
camel.component.netty4-http.configuration.port | 端口号。https 是 http 和 443 的默认 80。 | 整数 | |
camel.component.netty4-http.configuration.protocol | 要使用的协议,即 http 或 https | 字符串 | |
camel.component.netty4-http.configuration.send503when-suspended | 是否要在消费者被暂停时回发送 HTTP 状态代码 503。如果 选项为 false,则当使用者暂停时 Netty Acceptor 被 unbound,以便客户端无法再连接。 | true | 布尔值 |
camel.component.netty4-http.configuration.throw-exception-on-failure | 禁用丢弃 HttpOperationFailedException 的选项(如果来自远程服务器的响应失败)。这可让您获得所有响应,无论 HTTP 状态代码如何。 | true | 布尔值 |
camel.component.netty4-http.configuration.transfer-exception | 如果对使用者端启用和交换失败处理,并且如果导致的例外在响应中作为应用程序/x-java-serialized-object 内容类型发送回序列化,则进行后定。在制作者端,异常会按原样进行反序列化和丢弃,而不是 HttpOperationFailedException。导致的异常需要被序列化。默认情况下关闭。如果您启用此功能,Java 将把传入的数据从请求中反序列化为 Java,这可能会成为潜在的安全风险。 | false | 布尔值 |
camel.component.netty4-http.configuration.url-decode-headers | 如果启用了这个选项,则当从 Netty 绑定到 Camel Message 时,标头值将被 URL 解码(例如 %20)是空格字符。请注意,默认的 org.apache.camel.component.netty.http.NettyHttpBinding 使用这个选项,因此如果实施了自定义 org.apache.camel.component.netty4.http.NettyHttpBinding,因此您需要相应地对标头进行解码。 | false | 布尔值 |
camel.component.netty4-http.configuration.use-relative-path | 设置是否在 HTTP 请求中使用相对路径。 | false | 布尔值 |
camel.component.netty4-http.enabled | 启用 netty4-http 组件 | true | 布尔值 |
camel.component.netty4-http.executor-service | 使用给定的 EventExecutorGroup。选项是 io.netty.util.concurrent.EventExecutorGroup 类型。 | 字符串 | |
camel.component.netty4-http.header-filter-strategy | 使用自定义 org.apache.camel.spi.HeaderFilterStrategy 过滤标头。选项是一个 org.apache.camel.spi.HeaderFilterStrategy 类型。 | 字符串 | |
camel.component.netty4-http.maximum-pool-size | EventExecutorGroup 的线程池大小(如果其使用)。默认值为 16。 | 16 | 整数 |
camel.component.netty4-http.netty-http-binding | 使用自定义 org.apache.camel.component.netty4.http.NettyHttpBinding 绑定到/从 Netty 和 Camel Message API 绑定。选项是一个 org.apache.camel.component.netty4.http.NettyHttpBinding 类型。 | 字符串 | |
camel.component.netty4-http.resolve-property-placeholders | 启动时,组件是否应自行解析属性占位符。只有 String 类型的属性才能使用属性占位符。 | true | 布尔值 |
camel.component.netty4-http.security-configuration.authenticate | 是否默认启用身份验证 <p/>。 | 布尔值 | |
camel.component.netty4-http.security-configuration.constraint | 支持的限制。<p/> Currently only Basic 支持。 | 字符串 | |
camel.component.netty4-http.security-configuration.login-denied-logging-level | 设置日志记录拒绝登录尝试(cl stacktraces)<p/> 此级别默认为 DEBUG 的日志记录级别。 | LoggingLevel | |
camel.component.netty4-http.security-configuration.realm | 设置要使用的域的名称。 | 字符串 | |
camel.component.netty4-http.security-configuration.role-class-name | 字符串 | ||
camel.component.netty4-http.security-configuration.security-authenticator | 设置 {@link SecurityAuthenticator} 以用于对 {@link HttpPrincipal} 进行身份验证。 | SecurityAuthenticator | |
camel.component.netty4-http.security-configuration.security-constraint | 设置 {@link SecurityConstraint} 来检查 web 资源是否受限制或不限制 <p/>。这是 <tt>null</tt>,这表示所有资源都是受限的。 | SecurityConstraint | |
camel.component.netty4-http.ssl-context-parameters | 使用 SSLContextParameters 配置安全性。选项是一个 org.apache.camel.util.jsse.SSLContextParameters 类型。 | 字符串 | |
camel.component.netty4-http.use-global-ssl-context-parameters | 启用使用全局 SSL 上下文参数。 | false | 布尔值 |