PR for BAEL-798 - Apache Camel with Spring Boot (#2280)

* initial import

* simplified to rest only

* simplifications

* update

* Create ExampleServices.java

* Update Application.java

* simple readme

* strip of dependency management

* setting Camel versions apart where affected

* Update README.md

* update comments

* Update pom.xml

* delete of fabri8 deployment.yml

* remove extends
This commit is contained in:
Daniel Cassiani 2017-07-20 19:40:13 -03:00 committed by Zeger Hendrikse
parent c910f25334
commit 292d9f802f

View File

@ -13,14 +13,13 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletRegistrationBean; import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@SpringBootApplication @SpringBootApplication
@ComponentScan(basePackages="com.baeldung.camel") @ComponentScan(basePackages="com.baeldung.camel")
public class Application extends SpringBootServletInitializer { public class Application{
@Value("${server.port}") @Value("${server.port}")
String serverPort; String serverPort;
@ -62,10 +61,12 @@ public class Application extends SpringBootServletInitializer {
.bindingMode(RestBindingMode.json) .bindingMode(RestBindingMode.json)
.dataFormatProperty("prettyPrint", "true"); .dataFormatProperty("prettyPrint", "true");
/** /**
The Rest DSL supports automatic binding json/xml contents to/from POJOs using Camels Data Format. The Rest DSL supports automatic binding json/xml contents to/from
By default the binding mode is off, meaning there is no automatic binding happening for incoming and outgoing messages. POJOs using Camels Data Format.
You may want to use binding if you develop POJOs that maps to your REST services request and response types. By default the binding mode is off, meaning there is no automatic
This allows you, as a developer, to work with the POJOs in Java code. binding happening for incoming and outgoing messages.
You may want to use binding if you develop POJOs that maps to
your REST services request and response types.
*/ */
rest("/api/").description("Teste REST Service") rest("/api/").description("Teste REST Service")