Commit 1cd0a6d8 authored by Sarika Sama's avatar Sarika Sama

Initial commit

parent efdce8c5
...@@ -8,8 +8,7 @@ import org.springframework.web.bind.annotation.*; ...@@ -8,8 +8,7 @@ import org.springframework.web.bind.annotation.*;
import java.util.List; import java.util.List;
@RestController @RestController
public class DepartmentController public class DepartmentController {
{
@Autowired @Autowired
private DepartmentServiceImpl departmentService; private DepartmentServiceImpl departmentService;
...@@ -47,6 +46,7 @@ public class DepartmentController ...@@ -47,6 +46,7 @@ public class DepartmentController
public String deleteDepartmentById(@PathVariable("id") public String deleteDepartmentById(@PathVariable("id")
Long departmentId) Long departmentId)
{ {
departmentService.deleteDepartmentById( departmentService.deleteDepartmentById(
departmentId); departmentId);
return "Deleted Successfully"; return "Deleted Successfully";
......
...@@ -5,5 +5,6 @@ import org.springframework.data.repository.CrudRepository; ...@@ -5,5 +5,6 @@ import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
@Repository @Repository
public interface DepartmentRepository extends CrudRepository<Department, Long> { public interface DepartmentRepository extends CrudRepository<Department, Long>
{
} }
...@@ -9,7 +9,8 @@ import java.util.List; ...@@ -9,7 +9,8 @@ import java.util.List;
import java.util.Objects; import java.util.Objects;
@Service @Service
public class DepartmentServiceImpl implements departmentService{ public class DepartmentServiceImpl implements departmentService
{
@Autowired @Autowired
private DepartmentRepository departmentRepository; private DepartmentRepository departmentRepository;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment