Skip to content

Commit 2ff623a

Browse files
author
Varsha Das
committed
response entity changes
1 parent a519398 commit 2ff623a

File tree

3 files changed

+0
-8
lines changed

3 files changed

+0
-8
lines changed

spring-boot-response-entity-demo/pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
<dependency>
4040
<groupId>org.projectlombok</groupId>
4141
<artifactId>lombok</artifactId>
42-
<version>1.18.26</version>
4342
<scope>provided</scope>
4443
</dependency>
4544
</dependencies>

spring-boot-response-entity-demo/src/main/java/com/howtodoinjava/demo/SpringBootWebApplication.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,4 @@ public class SpringBootWebApplication {
1818
public static void main(String[] args) throws Exception {
1919
SpringApplication.run(SpringBootWebApplication.class, args);
2020
}
21-
2221
}

spring-boot-response-entity-demo/src/main/java/com/howtodoinjava/demo/service/StudentServiceImpl.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,13 @@ public List<Student> getAllStudents() {
2323
@Override
2424
public Optional<Student> getStudentById(Long id) {
2525
return studentRepository.findById(id);
26-
// .orElseThrow(() -> new ResourceNotFoundException("Student not found with id: " + id));
2726
}
2827

2928
@Override
3029
public Student createStudent(Student student) {
3130
return studentRepository.save(student);
3231
}
3332

34-
// public Optional<Student> getStudentById(Long id) {
35-
// return studentRepository.findById(id);
36-
// // Alternatively, throw an exception if student is not found
37-
// // .orElseThrow(() -> new ResourceNotFoundException("Student not found with id: " + id));
38-
// }
3933

4034
@Override
4135
public Student updateStudent(Long id, Student updatedStudent) {

0 commit comments

Comments
 (0)