Skip to content

Commit ae22d50

Browse files
author
Ivan Franchin
committed
Refactor docker-compose.yml and order-api pom.xml; small update in README
1 parent a789ff1 commit ae22d50

File tree

3 files changed

+41
-12
lines changed

3 files changed

+41
-12
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ On [ivangfr.github.io](https://ivangfr.github.io), I have compiled my Proof-of-C
187187
ADMIN_ACCESS_TOKEN="$(curl -s -X POST http://localhost:8080/auth/authenticate \
188188
-H 'Content-Type: application/json' \
189189
-d '{"username": "admin", "password": "admin"}' | jq -r .accessToken)"
190+
echo $ADMIN_ACCESS_TOKEN
190191
```
191192
192193
- Call again `GET /api/orders`, now with `admin` JWT access token:

docker-compose.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
services:
22

33
postgres:
4-
image: postgres:17.2
5-
container_name: postgres
4+
image: 'postgres:17.2'
5+
container_name: 'postgres'
66
ports:
7-
- "5432:5432"
7+
- '5432:5432'
88
environment:
9-
- POSTGRES_DB=orderdb
10-
- POSTGRES_PASSWORD=postgres
11-
- POSTGRES_USER=postgres
9+
- 'POSTGRES_DB=orderdb'
10+
- 'POSTGRES_PASSWORD=postgres'
11+
- 'POSTGRES_USER=postgres'
1212
healthcheck:
13-
test: "pg_isready -U postgres"
13+
test: 'pg_isready -U postgres'

order-api/pom.xml

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,36 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
34
<modelVersion>4.0.0</modelVersion>
45
<parent>
56
<groupId>org.springframework.boot</groupId>
67
<artifactId>spring-boot-starter-parent</artifactId>
78
<version>3.4.0</version>
8-
<relativePath /> <!-- lookup parent from repository -->
9+
<relativePath/> <!-- lookup parent from repository -->
910
</parent>
10-
1111
<groupId>com.ivanfranchin</groupId>
1212
<artifactId>order-api</artifactId>
1313
<version>0.0.1-SNAPSHOT</version>
1414
<name>order-api</name>
1515
<description>Demo project for Spring Boot</description>
16-
16+
<url/>
17+
<licenses>
18+
<license/>
19+
</licenses>
20+
<developers>
21+
<developer/>
22+
</developers>
23+
<scm>
24+
<connection/>
25+
<developerConnection/>
26+
<tag/>
27+
<url/>
28+
</scm>
1729
<properties>
1830
<java.version>21</java.version>
1931
<jjwt.version>0.12.6</jjwt.version>
2032
<springdoc-openapi.version>2.7.0</springdoc-openapi.version>
2133
</properties>
22-
2334
<dependencies>
2435
<dependency>
2536
<groupId>org.springframework.boot</groupId>
@@ -79,10 +90,27 @@
7990
<artifactId>spring-boot-starter-test</artifactId>
8091
<scope>test</scope>
8192
</dependency>
93+
<dependency>
94+
<groupId>org.springframework.security</groupId>
95+
<artifactId>spring-security-test</artifactId>
96+
<scope>test</scope>
97+
</dependency>
8298
</dependencies>
8399

84100
<build>
85101
<plugins>
102+
<plugin>
103+
<groupId>org.apache.maven.plugins</groupId>
104+
<artifactId>maven-compiler-plugin</artifactId>
105+
<configuration>
106+
<annotationProcessorPaths>
107+
<path>
108+
<groupId>org.projectlombok</groupId>
109+
<artifactId>lombok</artifactId>
110+
</path>
111+
</annotationProcessorPaths>
112+
</configuration>
113+
</plugin>
86114
<plugin>
87115
<groupId>org.springframework.boot</groupId>
88116
<artifactId>spring-boot-maven-plugin</artifactId>

0 commit comments

Comments
 (0)