package com.example.sample.controller import com.example.sample.entity.BookDto import com.example.sample.service.SampleService import org.springframework.web.bind.annotation.GetMapping import org.springframework.web.bind.annotation.ResponseBody import org.springframework.web.bind.annotation.RestController @RestController class Hello (private val sampleService: SampleService){ @GetMapping("/hello") fun sample(): String = "Hello" @GetMapping("/test") @ResponseBody fun hoge() : BookDto = sampleService.execute() }