Selaa lähdekoodia

Create README.md

David Ginzberg 7 vuotta sitten
vanhempi
commit
9b74aa2561
1 muutettua tiedostoa jossa 18 lisäystä ja 0 poistoa
  1. 18
    0
      README.md

+ 18
- 0
README.md Näytä tiedosto

@@ -0,0 +1,18 @@
1
+# CRUDApplication
2
+
3
+This repository provides a starter project for a CRUD application using Spring Boot, RestControllers, and H2 for an in memory database.
4
+
5
+## Exercise
6
+
7
+Using this project as a starter, create a Person class as an entity to persist to H2 with an autogenerated id. Provide a RestController for Person with endpoints for HTTP GET, PUT, POST, and DELETE operations mapping to their appropriate CRUD behaviors. endpoints should be at `/person` and `/person/{id}` as appropriate. See the snippet below for setting Person IDs:
8
+
9
+```Java
10
+@Entity
11
+public class Person {
12
+
13
+    @Id
14
+    @GeneratedValue(strategy = GenerationType.AUTO)
15
+    private Integer id;
16
+    ...
17
+}
18
+```