From 7c9f900549f0f8a0d9033c71f0ba40a9952e7774 Mon Sep 17 00:00:00 2001 From: Paul W Bennett Date: Tue, 2 May 2017 13:06:38 -0500 Subject: [PATCH 1/2] Change Spring MVC comments to REST --- README.md | 4 ++-- .../src/main/webapp/WEB-INF/classes/description.html | 6 +++--- .../application/springboot/web/LibertyHelloController.java | 4 ++-- .../test/java/it/springboot/web/HelloControllerTest.java | 4 ++-- .../service/springboot/api/v1/it/TestApplication.java | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index ba62aee..f3aed8c 100644 --- a/README.md +++ b/README.md @@ -21,12 +21,12 @@ Inside the project there is a application.servlet package containing the L For the complete feature documentation, see the [servlet-3.1](http://www.ibm.com/support/knowledgecenter/en/SSEQTP_liberty/com.ibm.websphere.wlp.nd.multiplatform.doc/ae/rwlp_feature_servlet-3.1.html) feature description in IBM Knowledge Center. -## Spring Boot with Spring MVC +## Spring Boot with Spring REST This provides you with a SpringBoot application that will run on WebSphere Liberty. Inside the project there is a application.springboot.web package containing two classes: * SpringBootLibertyApplication: The entry point for the SpringBoot application. -* LibertyHelloController: A Spring MVC endpoint which you can access at /springbootweb. +* LibertyHelloController: A Spring REST endpoint which you can access at /springbootweb. There is also a test class named it.springboot.web.HelloControllerTest that will test the Spring MVC endpoint to ensure it is working. diff --git a/starter-microservice-springboot-web/src/main/webapp/WEB-INF/classes/description.html b/starter-microservice-springboot-web/src/main/webapp/WEB-INF/classes/description.html index fa83c6d..25378a7 100644 --- a/starter-microservice-springboot-web/src/main/webapp/WEB-INF/classes/description.html +++ b/starter-microservice-springboot-web/src/main/webapp/WEB-INF/classes/description.html @@ -14,12 +14,12 @@ limitations under the License. -->
-

Spring Boot with Spring MVC

+

Spring Boot with Spring REST

Inside the project there is a application.springboot.web package containing two classes:

-

There is also a test class named it.springboot.web.HelloControllerTest that will test the Spring MVC endpoint to ensure it is working.

+

There is also a test class named it.springboot.web.HelloControllerTest that will test the Spring REST endpoint to ensure it is working.

diff --git a/starter-microservice-springboot-web/src/main/webapp/sample/src/main/java/application/springboot/web/LibertyHelloController.java b/starter-microservice-springboot-web/src/main/webapp/sample/src/main/java/application/springboot/web/LibertyHelloController.java index aff3e2f..6e6a921 100644 --- a/starter-microservice-springboot-web/src/main/webapp/sample/src/main/java/application/springboot/web/LibertyHelloController.java +++ b/starter-microservice-springboot-web/src/main/webapp/sample/src/main/java/application/springboot/web/LibertyHelloController.java @@ -23,7 +23,7 @@ public class LibertyHelloController { @RequestMapping("/springbootweb") public String hello() { - return "Hello from Spring Boot MVC running on Liberty!"; + return "Hello from Spring Boot REST running on Liberty!"; } -} \ No newline at end of file +} diff --git a/starter-microservice-springboot-web/src/main/webapp/sample/src/test/java/it/springboot/web/HelloControllerTest.java b/starter-microservice-springboot-web/src/main/webapp/sample/src/test/java/it/springboot/web/HelloControllerTest.java index 4bc2b19..07660a7 100644 --- a/starter-microservice-springboot-web/src/main/webapp/sample/src/test/java/it/springboot/web/HelloControllerTest.java +++ b/starter-microservice-springboot-web/src/main/webapp/sample/src/test/java/it/springboot/web/HelloControllerTest.java @@ -24,6 +24,6 @@ public class HelloControllerTest extends EndpointTest { @Test public void testDeployment() { - testEndpoint("/springbootweb", "Hello from Spring Boot MVC running on Liberty!"); + testEndpoint("/springbootweb", "Hello from Spring Boot REST running on Liberty!"); } -} \ No newline at end of file +} diff --git a/starter-microservice-springboot-web/src/test/java/com/ibm/liberty/starter/service/springboot/api/v1/it/TestApplication.java b/starter-microservice-springboot-web/src/test/java/com/ibm/liberty/starter/service/springboot/api/v1/it/TestApplication.java index 24aaaaf..a9ba46e 100644 --- a/starter-microservice-springboot-web/src/test/java/com/ibm/liberty/starter/service/springboot/api/v1/it/TestApplication.java +++ b/starter-microservice-springboot-web/src/test/java/com/ibm/liberty/starter/service/springboot/api/v1/it/TestApplication.java @@ -40,7 +40,7 @@ public void checkSetup() { public void testProvider() throws Exception { Provider provider = testEndpoint("/api/v1/provider/", Provider.class); assertNotNull("No response from API for provider", provider); - assertTrue("Description was not found.", provider.getDescription().contains("

Spring Boot with Spring MVC

")); + assertTrue("Description was not found.", provider.getDescription().contains("

Spring Boot with Spring REST

")); Dependency[] dependencies = provider.getDependencies(); boolean providedDependency = false; boolean runtimeDependency = false; From 16ee17d33de6ed614de398f49cbbd1ed4d56e6fa Mon Sep 17 00:00:00 2001 From: Paul W Bennett Date: Wed, 3 May 2017 09:40:30 -0500 Subject: [PATCH 2/2] Change MVC to REST in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f3aed8c..bd625cd 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Inside the project there is a application.springboot.web package containing two * SpringBootLibertyApplication: The entry point for the SpringBoot application. * LibertyHelloController: A Spring REST endpoint which you can access at /springbootweb. -There is also a test class named it.springboot.web.HelloControllerTest that will test the Spring MVC endpoint to ensure it is working. +There is also a test class named it.springboot.web.HelloControllerTest that will test the Spring REST endpoint to ensure it is working. ## Websockets This provides you with the websocket-1.1 feature.