1 Star 0 Fork 1

zhouanan511/camel-spring-boot-examples2

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
README.adoc 1.17 KB
一键复制 编辑 原始数据 按行查看 历史

Camel Rest Swagger example

This example shows how to call a REST service defined using Swagger specification with the help of Camel Rest Swagger component.

The example is a standalong Spring Boot application that acts as a REST client, you can run simply by issuing:

$ mvn spring-boot:run

Or by packaging it and running it using java CLI:

$ mvn package
$ java -jar target/camel-example-spring-boot-rest-swagger-simple-*.jar

The example by default uses the PetStore demo hosted on swagger.io and invokes the getInventory operation. You can make it call any API that you have Swagger specification for and any operation with simple arguments, for instance this retrives a pet from the PetStore demo with ID 14:

$ java -jar target/camel-example-spring-boot-rest-swagger-simple-*.jar \
    --swagger=https://petstore.swagger.io/v2/swagger.json \
    --operation=getPetById \
    --petId=14

Help and contributions

If you hit any problem using Camel or have some feedback, then please let us know.

We also love contributors, so get involved :-)

The Camel riders!

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhouanan511/camel-spring-boot-examples2.git
git@gitee.com:zhouanan511/camel-spring-boot-examples2.git
zhouanan511
camel-spring-boot-examples2
camel-spring-boot-examples2
camel-3.4.x

搜索帮助

0d507c66 1850385 C8b1a773 1850385