Skip to content

test PR #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 6 commits into from
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