Repository: camel
Updated Branches:
  refs/heads/master 1f082895f -> 32ef19d89


Use 'JPA' instead of 'SQL' in the Spring Boot REST DSL JPA example


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/32ef19d8
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/32ef19d8
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/32ef19d8

Branch: refs/heads/master
Commit: 32ef19d89e0fdda8dc7b37ea8edfd5448ca848e7
Parents: 1f08289
Author: Antonin Stefanutti <anto...@stefanutti.fr>
Authored: Fri Sep 2 18:43:40 2016 +0200
Committer: Antonin Stefanutti <anto...@stefanutti.fr>
Committed: Fri Sep 2 18:43:40 2016 +0200

----------------------------------------------------------------------
 examples/camel-example-spring-boot-rest-jpa/README.md     | 10 +++++-----
 .../camel/example/spring/boot/rest/jpa/Application.java   |  4 ++--
 .../example/spring/boot/rest/jpa/ApplicationTest.java     |  4 ++--
 3 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/32ef19d8/examples/camel-example-spring-boot-rest-jpa/README.md
----------------------------------------------------------------------
diff --git a/examples/camel-example-spring-boot-rest-jpa/README.md 
b/examples/camel-example-spring-boot-rest-jpa/README.md
index 0818929..72e3975 100644
--- a/examples/camel-example-spring-boot-rest-jpa/README.md
+++ b/examples/camel-example-spring-boot-rest-jpa/README.md
@@ -2,7 +2,7 @@
 
 ### Introduction
 
-This example demonstrates how to use SQL via JDBC along with Camel's REST DSL
+This example demonstrates how to use JPA and Spring Data along with Camel's 
REST DSL
 to expose a RESTful API that performs CRUD operations on a database.
 
 It generates orders for books referenced in database at a regular pace.
@@ -57,16 +57,16 @@ being logged to the console, e.g.:
 
 You can then access the REST API directly from your Web browser, e.g.:
 
-- <http://localhost:8080/camel-rest-sql/books>
-- <http://localhost:8080/camel-rest-sql/books/order/1>
+- <http://localhost:8080/camel-rest-jpa/books>
+- <http://localhost:8080/camel-rest-jpa/books/order/1>
 
 The Camel application can be stopped pressing <kbd>ctrl</kbd>+<kbd>c</kbd> in 
the shell.
 
 ### Swagger API
 
 The example provides API documentation of the service using Swagger using
-the _context-path_ `camel-rest-sql/api-doc`. You can access the API 
documentation
-from your Web browser at <http://localhost:8080/camel-rest-sql/api-doc>.
+the _context-path_ `camel-rest-jpa/api-doc`. You can access the API 
documentation
+from your Web browser at <http://localhost:8080/camel-rest-jpa/api-doc>.
 
 ### Forum, Help, etc
 

http://git-wip-us.apache.org/repos/asf/camel/blob/32ef19d8/examples/camel-example-spring-boot-rest-jpa/src/main/java/org/apache/camel/example/spring/boot/rest/jpa/Application.java
----------------------------------------------------------------------
diff --git 
a/examples/camel-example-spring-boot-rest-jpa/src/main/java/org/apache/camel/example/spring/boot/rest/jpa/Application.java
 
b/examples/camel-example-spring-boot-rest-jpa/src/main/java/org/apache/camel/example/spring/boot/rest/jpa/Application.java
index 6fe265a..9a8ff13 100644
--- 
a/examples/camel-example-spring-boot-rest-jpa/src/main/java/org/apache/camel/example/spring/boot/rest/jpa/Application.java
+++ 
b/examples/camel-example-spring-boot-rest-jpa/src/main/java/org/apache/camel/example/spring/boot/rest/jpa/Application.java
@@ -36,7 +36,7 @@ public class Application extends SpringBootServletInitializer 
{
     @Bean
     ServletRegistrationBean servletRegistrationBean() {
         ServletRegistrationBean servlet = new ServletRegistrationBean(
-            new CamelHttpTransportServlet(), "/camel-rest-sql/*");
+            new CamelHttpTransportServlet(), "/camel-rest-jpa/*");
         servlet.setName("CamelServlet");
         return servlet;
     }
@@ -47,7 +47,7 @@ public class Application extends SpringBootServletInitializer 
{
         @Override
         public void configure() {
             restConfiguration()
-                .contextPath("/camel-rest-sql").apiContextPath("/api-doc")
+                .contextPath("/camel-rest-jpa").apiContextPath("/api-doc")
                     .apiProperty("api.title", "Camel REST API")
                     .apiProperty("api.version", "1.0")
                     .apiProperty("cors", "true")

http://git-wip-us.apache.org/repos/asf/camel/blob/32ef19d8/examples/camel-example-spring-boot-rest-jpa/src/test/java/org/apache/camel/example/spring/boot/rest/jpa/ApplicationTest.java
----------------------------------------------------------------------
diff --git 
a/examples/camel-example-spring-boot-rest-jpa/src/test/java/org/apache/camel/example/spring/boot/rest/jpa/ApplicationTest.java
 
b/examples/camel-example-spring-boot-rest-jpa/src/test/java/org/apache/camel/example/spring/boot/rest/jpa/ApplicationTest.java
index b2d0d46..b2d692c 100644
--- 
a/examples/camel-example-spring-boot-rest-jpa/src/test/java/org/apache/camel/example/spring/boot/rest/jpa/ApplicationTest.java
+++ 
b/examples/camel-example-spring-boot-rest-jpa/src/test/java/org/apache/camel/example/spring/boot/rest/jpa/ApplicationTest.java
@@ -58,7 +58,7 @@ public class ApplicationTest {
         assertThat(notify.matches(5, TimeUnit.SECONDS)).isTrue();
 
         // Then call the REST API
-        ResponseEntity<Order> response = 
restTemplate.getForEntity("/camel-rest-sql/books/order/1", Order.class);
+        ResponseEntity<Order> response = 
restTemplate.getForEntity("/camel-rest-jpa/books/order/1", Order.class);
         assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK);
         Order order = response.getBody();
         assertThat(order.getId()).isEqualTo(1);
@@ -70,7 +70,7 @@ public class ApplicationTest {
 
     @Test
     public void booksTest() {
-        ResponseEntity<List<Book>> response = 
restTemplate.exchange("/camel-rest-sql/books",
+        ResponseEntity<List<Book>> response = 
restTemplate.exchange("/camel-rest-jpa/books",
             HttpMethod.GET, null, new ParameterizedTypeReference<List<Book>>() 
{
             });
         assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK);

Reply via email to