File tree Expand file tree Collapse file tree 3 files changed +0
-8
lines changed
spring-boot-response-entity-demo
src/main/java/com/howtodoinjava/demo Expand file tree Collapse file tree 3 files changed +0
-8
lines changed Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff 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 ) {
You can’t perform that action at this time.
0 commit comments