sleep 10
echo "Make an HTTP request to the Hello World endpoint and display the response"
-response=$(curl -s http://localhost:8080/helloworld/sme)
+response=$(curl -s http://localhost:8080/v1/helloworld/sme)
-echo "Response from the /helloworld/sme endpoint: "
+echo "Response from the /v1/helloworld/sme endpoint: "
echo "$response"
-response2=$(curl -s http://localhost:8080/helloworld)
-echo "Response from the /helloworld endpoint: "
+response2=$(curl -s http://localhost:8080/v1/helloworld)
+echo "Response from the /v1/helloworld endpoint: "
echo "$response2"
import org.springframework.web.bind.annotation.RestController;\r
\r
@RestController\r
-@RequestMapping("/helloworld")\r
+@RequestMapping("/v1/helloworld")\r
public class HelloWorldController {\r
\r
@RequestMapping("")\r
public void testHelloWorldEndpoint() throws Exception {\r
when(helloWorldController.helloWorld()).thenReturn("Hello World from service stub\n");\r
\r
- mockMvc.perform(get("/helloworld"))\r
+ mockMvc.perform(get("/v1/helloworld"))\r
.andExpect(status().isOk())\r
.andExpect(content().string("Hello World from service stub\n"));\r
}\r
public void testHelloWorldSmeEndpoint() throws Exception {\r
when(helloWorldController.helloWorldSme()).thenReturn("Hello World from SME\n");\r
\r
- mockMvc.perform(get("/helloworld/sme"))\r
+ mockMvc.perform(get("/v1/helloworld/sme"))\r
.andExpect(status().isOk())\r
.andExpect(content().string("Hello World from SME\n"));\r
}\r