0
我该如何在骆驼中启用http日志?我正在使用rest-dsl。我想看到的HTTP标题和正文为每个请求和响应我的代码:骆驼码头组件日志记录
restConfiguration()
.component("jetty")
.host("0.0.0.0")
.port(port)
.scheme("https")
.bindingMode(RestBindingMode.json)
.dataFormatProperty("json.in.disableFeatures", "FAIL_ON_UNKNOWN_PROPERTIES")
.dataFormatProperty("json.in.enableFeatures", "FAIL_ON_NULL_FOR_PRIMITIVES")
.componentProperty("sslKeyPassword", KEYSTORE_PASSWORD)
.componentProperty("sslKeystore", KEYSTORE)
.componentProperty("sslPassword", KEYSTORE_PASSWORD)
.enableCORS(true)
.componentProperty("traceEnabled", "true")
// swagger
.apiContextPath("api-doc")
.apiProperty("api.title", "Mobile Api").apiProperty("api.version", "v1.0")
.apiProperty("schemes", "https")
;
和
rest(MOBILE_API_PATH).produces("application/json").consumes("application/json")
.post("/transaction").type(MobileTransactionRequest.class).outType(MobileTransactionResponse.class)
.to("direct:mobileTransaction")