refactor: Use Restcontroller
parent
607208bdd9
commit
d0503eae0d
Binary file not shown.
|
@ -9,8 +9,6 @@ import com.maradona.backend.repositories.EmployeeRepository;
|
|||
import com.maradona.backend.repositories.FormOfAddressRepository;
|
||||
import com.maradona.backend.repositories.PrimarySkillRepository;
|
||||
import com.maradona.backend.repositories.SecondarySkillRepository;
|
||||
import com.maradona.backend.repositories.EmployeeSecondarySkillRepository;
|
||||
import com.maradona.backend.repositories.ProjectRepository;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.CommandLineRunner;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
|
|
@ -10,7 +10,7 @@ import org.springframework.web.bind.annotation.PutMapping;
|
|||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.maradona.backend.dto.SkillPrototype;
|
||||
import com.maradona.backend.entities.Employee;
|
||||
|
@ -31,7 +31,7 @@ import com.maradona.backend.services.EmployeeService;
|
|||
*
|
||||
* @see com.maradona.backend.entities.Employee
|
||||
*/
|
||||
@Controller
|
||||
@RestController
|
||||
@RequestMapping("/api/employee")
|
||||
public class EmployeeController {
|
||||
@Autowired
|
||||
|
|
|
@ -5,7 +5,6 @@ import java.util.Optional;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
|
@ -13,6 +12,7 @@ import org.springframework.web.bind.annotation.PutMapping;
|
|||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.maradona.backend.entities.Project;
|
||||
import com.maradona.backend.services.ProjectService;
|
||||
|
@ -31,7 +31,7 @@ import com.maradona.backend.services.ProjectService;
|
|||
* @warning The ProjectService is not accounting for the user yet.
|
||||
* @see com.maradona.backend.entities.Project
|
||||
*/
|
||||
@Controller
|
||||
@RestController
|
||||
@RequestMapping("/api/project")
|
||||
public class ProjectController {
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ import java.util.Optional;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
|
@ -13,6 +12,7 @@ import org.springframework.web.bind.annotation.PutMapping;
|
|||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.maradona.backend.entities.SecondarySkill;
|
||||
import com.maradona.backend.services.SecondarySkillService;
|
||||
|
@ -30,7 +30,7 @@ import com.maradona.backend.services.SecondarySkillService;
|
|||
*
|
||||
* @see com.maradona.backend.entities.SecondarySkill
|
||||
*/
|
||||
@Controller
|
||||
@RestController
|
||||
@RequestMapping("/api/secondary-skill")
|
||||
public class SecondarySkillController {
|
||||
|
||||
|
|
Loading…
Reference in New Issue