File tree 1 file changed +1
-51
lines changed
1 file changed +1
-51
lines changed Original file line number Diff line number Diff line change 1
- # ActiveWeb REST API Example APP
2
-
3
- Provides an example CRUD REST service using [ JavaLite] ( http://javalite.io ) technologies.
4
-
5
- ## Running
6
-
7
- ### Adjust database connection values
8
-
9
- * [ database.properties] ( src/main/resources/database.properties )
10
-
11
- ### create databases:
12
-
13
- You need to do this only once. Foe more information see [ Database migrations] ( http://javalite.io/database_migrations ) .
14
-
15
- ```
16
- mvn db-migrator:create
17
- ```
18
-
19
- ### Start the app
20
-
21
- Running is the same as any other Java app:
22
-
23
- ```
24
- mvn jetty:run
25
- ```
26
-
27
- and then navigating to [ http://localhost:8080/people ] ( http://localhost:8080/people ) .
28
-
29
- ### Posting new JSON document
30
-
31
- is easy by executing this command (from root of this project):
32
-
33
- ```
34
- curl -X POST -H "Content-Type: octet/stream" --data-binary @src/test/resources/people.json http://localhost:8080/people
35
-
36
- ```
37
-
38
- Navigate to [ http://localhost:8080/people ] ( http://localhost:8080/people ) again and see new people created (and note their IDs).
39
-
40
- Explore an individual person:
41
- [ http://localhost:8080/people/1 ] ( http://localhost:8080/people/1 ) , where "1" is an ID of a single person
42
-
43
-
44
- ## Features
45
-
46
- * ** Models are simple** : [ src/main/java/app/models] ( src/main/java/app/models ) . Only the Person model
47
- has a method ` getAddresses() ` , otherwise no methods
48
- * ** RESTful controller uses automatic routes** : [ PeopleController.java] ( src/main/java/app/controllers/PeopleController.java )
49
- * ** Exceptional conditions handled outside business logic** : [ CatchAllFilter.java] ( src/main/java/app/controllers/CatchAllFilter.java )
50
- * ** JSON is generated using powerful templating** : with partials and children - [ people views] ( src/main/webapp/WEB-INF/views/people/ )
51
- * ** Tests expect certain JSON structure and data** : [ PeopleControllerSpec.java] ( src/test/java/app/controllers/PeopleControllerSpec.java )
1
+ # This repository is deprecated. All examples have moved to the [ JavaLite Examples] ( https://github.com/javalite/javalite-examples ) repo.
You can’t perform that action at this time.
0 commit comments