<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-undertow-starter</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-rest-swagger-starter</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-undertow-starter</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-rest-swagger-starter</artifactId>
</dependency>
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
@Bean
public Component petstore(CamelContext camelContext, UndertowComponent undertow) {
RestSwaggerComponent petstore = new RestSwaggerComponent(camelContext);
petstore.setSpecificationUri("http://petstore.swagger.io/v2/swagger.json");
petstore.setDelegate(undertow);
return petstore;
}
@Bean
public Component petstore(CamelContext camelContext, UndertowComponent undertow) {
RestSwaggerComponent petstore = new RestSwaggerComponent(camelContext);
petstore.setSpecificationUri("http://petstore.swagger.io/v2/swagger.json");
petstore.setDelegate(undertow);
return petstore;
}
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
@Autowired
ProducerTemplate template;
String getPetJsonById(int petId) {
return template.requestBodyAndHeaders("petstore:getPetById", null, "petId", petId);
}
@Autowired
ProducerTemplate template;
String getPetJsonById(int petId) {
return template.requestBodyAndHeaders("petstore:getPetById", null, "petId", petId);
}
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow