123456789101112131415161718192021222324 |
- package com.gxzc.zen
- import org.springframework.boot.autoconfigure.EnableAutoConfiguration
- import org.springframework.web.bind.annotation.RestController
- import org.springframework.web.bind.annotation.PathVariable
- import org.springframework.web.bind.annotation.RequestMapping
- @RestController
- @EnableAutoConfiguration
- class ExampleController {
- @RequestMapping("/")
- fun home(): String {
- return "Hello World!"
- }
- @RequestMapping("/hello/{myName}")
- fun index(@PathVariable myName: String): String {
- return "Hello $myName!!!"
- }
- }
|