Skip to content

Commit 4439236

Browse files
committed
Formatting for Markdown
1 parent 719437d commit 4439236

File tree

1 file changed

+25
-8
lines changed

1 file changed

+25
-8
lines changed

README.MD

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
21
# Spring Boot application with Redis in persistence layer
2+
33
[![Java CI with Maven](https://github.com/andrei-punko/spring-boot-redis/actions/workflows/maven.yml/badge.svg)](https://github.com/andrei-punko/spring-boot-redis/actions/workflows/maven.yml)
44
[![Coverage](.github/badges/jacoco.svg)](https://github.com/andrei-punko/spring-boot-redis/actions/workflows/maven.yml)
55
[![Branches](.github/badges/branches.svg)](https://github.com/andrei-punko/spring-boot-redis/actions/workflows/maven.yml)
@@ -10,76 +10,93 @@ Includes web-server on port 9080 with `/api/v1/articles` endpoint exposed.
1010
Supports CRUD set of operations and R with pagination
1111

1212
## Prerequisites:
13+
1314
- Maven 3
1415
- JDK 21
1516

1617
## How to build:
18+
1719
```shell
1820
mvn clean install
1921
```
2022

2123
### Build Docker image with application inside:
24+
2225
```shell
2326
docker build --no-cache ./ -t spring-boot-redis-app
2427
```
2528

2629
## Start application using starting script:
30+
2731
Use [run-in-docker.bat](run-in-docker.bat) script
2832

2933
## Start application by running executable jar (Redis should be started before that manually):
34+
3035
java -jar target/spring-boot-redis-0.0.1-SNAPSHOT.jar \
3136
--spring.redis.host=localhost \
3237
--spring.redis.port=6379
3338

3439
## Same thing but using Spring profile to determine properties (Redis should be started before that manually):
40+
3541
java -jar target/spring-boot-redis-0.0.1-SNAPSHOT.jar \
3642
--spring.profiles.active=dev
3743

3844
## Start application using Maven (Redis should be started before that manually):
45+
3946
mvn spring-boot:run -Dspring-boot.run.arguments="\
4047
--spring.redis.host=localhost \
4148
--spring.redis.port=6379
4249

4350
## Same thing but using Spring profile to determine properties (Redis should be started before that manually):
51+
4452
mvn spring-boot:run -Dspring-boot.run.arguments=--spring.profiles.active=dev
4553

4654
## Start application using set of two Docker containers - one with Redis and another with application:
55+
4756
docker-compose up
4857

49-
## Link for quick check:
58+
## Link for quick check:
59+
5060
http://localhost:9080/api/v1/articles
5161

52-
## Swagger documentation:
62+
## Swagger documentation:
63+
5364
http://localhost:9080/swagger-ui/index.html
5465

5566
## Useful CURL commands:
5667

57-
### New article addition:
68+
### New article addition:
69+
5870
```shell
5971
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
6072
```
6173

62-
### Get existing article:
74+
### Get existing article:
75+
6376
```shell
6477
curl -i http://localhost:9080/api/v1/articles/1
6578
```
6679

67-
### Update existing article:
80+
### Update existing article:
81+
6882
```shell
6983
curl -i -H "Accept: application/json" -H "Content-Type: application/json" -d '{ "title": "Another tittle" }' -X PATCH http://localhost:9080/api/v1/articles/2
7084
```
7185

7286
### Get all articles:
87+
7388
```shell
7489
curl -i http://localhost:9080/api/v1/articles
7590
```
7691

77-
### Get list of articles with pagination support:
92+
### Get list of articles with pagination support:
93+
7894
```shell
7995
curl -i 'http://localhost:9080/api/v1/articles?size=2&page=4&sort=author.firstName,DESC'
8096
```
8197

82-
### Deletion of article:
98+
### Deletion of article:
99+
83100
```shell
84101
curl -i -X DELETE http://localhost:9080/api/v1/articles/1
85102
```

0 commit comments

Comments
 (0)