package com.example.testsample;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("sample")
public class SampleController {
private final SampleAppService sampleService;
public SampleController(final SampleAppService sampleService) {
this.sampleService = sampleService;
}
@GetMapping
public ResponseEntity<SampleResponse> get() {
return ResponseEntity.ok(sampleService.hoge());
}
}