Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
springboot-example
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sarika Sama
springboot-example
Commits
1cd0a6d8
Commit
1cd0a6d8
authored
Mar 09, 2023
by
Sarika Sama
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial commit
parent
efdce8c5
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
4 deletions
+6
-4
DepartmentController.java
...um/springbootexample/controller/DepartmentController.java
+2
-2
DepartmentRepository.java
...um/springbootexample/repository/DepartmentRepository.java
+2
-1
DepartmentServiceImpl.java
...isum/springbootexample/service/DepartmentServiceImpl.java
+2
-1
No files found.
src/main/java/com/nisum/springbootexample/controller/DepartmentController.java
View file @
1cd0a6d8
...
...
@@ -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"
;
...
...
src/main/java/com/nisum/springbootexample/repository/DepartmentRepository.java
View file @
1cd0a6d8
...
...
@@ -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
>
{
}
src/main/java/com/nisum/springbootexample/service/DepartmentServiceImpl.java
View file @
1cd0a6d8
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment