package com.Controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import com.Service.UserService;

@RestController
public class Controller {

  @Autowired
  UserService userService;

  @GetMapping("insert")
  public void transactionTestWithInsert() {
    userService.insert();
  }

  @GetMapping("select")
  public ResponseEntity transactionTestWithSelect() {

    return ResponseEntity.ok(userService.findUser().size());

  }
}
