@@ -14,13 +14,17 @@ Supports CRUD set of operations and R with pagination
14
14
- JDK 21
15
15
16
16
## How to build:
17
- mvn clean install
17
+ ```shell
18
+ mvn clean install
19
+ ```
18
20
19
- #### Build Docker image with application inside:
20
- docker build ./ -t spring-boot-redis-app
21
+ ### Build Docker image with application inside:
22
+ ```shell
23
+ docker build --no-cache ./ -t spring-boot-redis-app
24
+ ```
21
25
22
26
## Start application using starting script:
23
- Use [run-in-docker.bat](./ run-in-docker.bat) script
27
+ Use [run-in-docker.bat](run-in-docker.bat) script
24
28
25
29
## Start application by running executable jar (Redis should be started before that manually):
26
30
java -jar target/spring-boot-redis-0.0.1-SNAPSHOT.jar \
@@ -50,16 +54,38 @@ http://localhost:9080/swagger-ui/index.html
50
54
51
55
## Useful CURL commands:
52
56
- New article addition:
53
- `curl -i -H "Accept: application/json" -H "Content-Type: application/json" -d '{ "title": "Some tittle", "text": "Some text", "summary": "bla-bla", "author": "Pushkin" }' -X POST http://localhost:9080/api/v1/articles`
57
+ ```shell
58
+ curl -i -H "Accept: application/json" -H "Content-Type: application/json" -d '{ "title": "Some tittle", "text": "Some text", "summary": "bla-bla", "author": "Pushkin" }' -X POST http://localhost:9080/api/v1/articles
59
+ ```
54
60
55
61
- Get existing article:
56
- `curl -i http://localhost:9080/api/v1/articles/1`
62
+ ```shell
63
+ curl -i http://localhost:9080/api/v1/articles/1
64
+ ```
57
65
58
66
- Update existing article:
59
- `curl -i -H "Accept: application/json" -H "Content-Type: application/json" -d '{ "title": "Another tittle" }' -X PATCH http://localhost:9080/api/v1/articles/2`
67
+ ```shell
68
+ curl -i -H "Accept: application/json" -H "Content-Type: application/json" -d '{ "title": "Another tittle" }' -X PATCH http://localhost:9080/api/v1/articles/2
69
+ ```
70
+
71
+ - Get all articles:
72
+ ```shell
73
+ curl -i http://localhost:9080/api/v1/articles
74
+ ```
60
75
61
76
- Get list of articles with pagination support:
62
- `curl -i 'http://localhost:9080/api/v1/articles?size=2&page=4&sort=author.firstName,DESC'`
77
+ ```shell
78
+ curl -i 'http://localhost:9080/api/v1/articles?size=2&page=4&sort=author.firstName,DESC'
79
+ ```
63
80
64
81
- Deletion of article:
65
- `curl -i -X DELETE http://localhost:9080/api/v1/articles/1`
82
+ ```shell
83
+ curl -i -X DELETE http://localhost:9080/api/v1/articles/1
84
+ ```
85
+
86
+ ## Run functional tests:
87
+
88
+ cd func-test
89
+ ./gradlew clean build
90
+
91
+ Check functional test report [here](func-test/build/spock-reports/index.html)
0 commit comments