Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ public class EasyNotesApplication {

public static void main(String[] args) {
SpringApplication.run(EasyNotesApplication.class, args);
System.out.println("Hello World");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ public class IndexController {
public String sayHello() {
return "Hello and Welcome to the EasyNotes application. You can create a new Note by making a POST request to /api/notes endpoint.";
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import java.util.List;

/**
* Created by rajeevkumarsingh on 27/06/17.
*/
@RestController
@RequestMapping("/api")
Expand All @@ -22,11 +21,15 @@ public class NoteController {

@GetMapping("/notes")
public List<Note> getAllNotes() {
System.out.println("GetMapping");
System.out.println("Hello");
return noteRepository.findAll();

}

@PostMapping("/notes")
public Note createNote(@Valid @RequestBody Note note) {
System.out.println("Added in post");
return noteRepository.save(note);
}

Expand Down