testImplementation 'org.springframework.boot:spring-boot-starter-test'
implementation group: 'org.mybatis.spring.boot', name: 'mybatis-spring-boot-starter', version: '2.1.4'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: '2.4.5'
+ implementation group: 'com.google.guava', name: 'guava', version: '30.1.1-jre'
}
test {
--- /dev/null
+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