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

Initial commit

parent efdce8c5
......@@ -8,8 +8,7 @@ import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
public class DepartmentController
{
public class DepartmentController {
@Autowired
private DepartmentServiceImpl departmentService;
......@@ -47,6 +46,7 @@ public class DepartmentController
public String deleteDepartmentById(@PathVariable("id")
Long departmentId)
{
departmentService.deleteDepartmentById(
departmentId);
return "Deleted Successfully";
......
......@@ -5,5 +5,6 @@ import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;
@Repository
public interface DepartmentRepository extends CrudRepository<Department, Long> {
public interface DepartmentRepository extends CrudRepository<Department, Long>
{
}
......@@ -9,7 +9,8 @@ import java.util.List;
import java.util.Objects;
@Service
public class DepartmentServiceImpl implements departmentService{
public class DepartmentServiceImpl implements departmentService
{
@Autowired
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