getListExample() : ResponseEntity
//controller
@RestController
@RequestMapping("/api/v1/example")
@Slf4j
public class ExampleController {
private ExampleService exampleService;
@Autowired
public ExampleController(ExampleService exampleService) {
this.exampleService = exampleService;
}
@GetMapping("/list")
public ResponseEntity<List<ExampleDTO>> getListExample() {
return ResponseEntity.ok(exampleService.getListExample());
}
}
getListExample() : List
//service
public interface ExampleService {
public List<ExampleDTO> getListExample();
}
findAll() : List
//mapper
@Mapper
public interface ExampleMapper {
List<ExampleVO> findAll();
}