+package com.example.rest;\r
+\r
+import java.util.List;\r
+\r
+import org.springframework.web.bind.annotation.RequestMapping;\r
+import org.springframework.web.bind.annotation.ResponseBody;\r
+import org.springframework.web.bind.annotation.RestController;\r
+\r
+import com.google.common.collect.Lists;\r
+\r
+\r
+@RestController\r
+public class SampleRestController {\r
+\r
+ @RequestMapping(value = "/test")\r
+ @ResponseBody\r
+ public List<String> test() {\r
+ List<String> list = Lists.newArrayList();\r
+ list.add("array1");\r
+ list.add("array2");\r
+ return list;\r
+ }\r
+}\r