123456789101112131415161718192021222324252627282930 |
- package com.gxzc.zen
- import com.gxzc.zen.sys.dao.TestDao
- import com.gxzc.zen.sys.service.TestService
- import org.springframework.beans.factory.annotation.Autowired
- import org.springframework.ui.Model
- import org.springframework.web.bind.annotation.PathVariable
- import org.springframework.web.bind.annotation.RequestMapping
- import org.springframework.web.bind.annotation.RestController
- @RestController
- class ExampleController {
- @Autowired
- private val service: TestService?=null
- @RequestMapping("/")
- fun home(model:Model): String {
- // val one=service?.findOne(1)
- val list=service?.findList(mapOf())
- val html="size:"+list?.size
- return "Hello World!"+html
- }
- @RequestMapping("/hello/{myName}")
- fun index(@PathVariable myName: String): String {
- return "Hello $myName!!!"
- }
- }
|