How to expose Rest API using Spring Boot with Apache Camel
org.apache.camel camel-spring-boot-starter 2.24.0 org.apache.camel camel-servlet-starter 2.24.0 org.apache.camel camel-jackson 2.24.0restConfiguration().component("servlet").port(9090).host("localhost").bindingMode(RestBindingMode.json);
rest().post("/addOrder").consumes(MediaType.APPLICATION_JSON_VALUE).type(Order.class).outType(Order.class)
.route().process(processor).endRest();
http://localhost:9090/addStudent
{
"name":"akshit",
"email":"akshit@gmail.com",
"course":"MCA"
}
http://localhost:9090/getStudent
it will return all students list