Skip to content

Commit 20c94c1

Browse files
author
Ivan Franchin
committed
project upgrade
- upgrade to java 17; - upgrade to spring-boot 2.7.3; - upgrade to okta-spring 2.1.6; - upgrade to maven distributionUrl 3.8.6; - upgrade to springdoc-openapi 1.6.11; - upgrade to mapstruct 1.5.2.Final; - upgrade to elasticsearch docker image 7.17.4; - upgrade to react 18.2.0; - upgrade npm dependencies; - reduce the screenshot image size by changing from png to jpeg; - update README.
1 parent 110de2a commit 20c94c1

File tree

11 files changed

+112
-152
lines changed

11 files changed

+112
-152
lines changed

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ The goal of this project is to implement an application where a user can manage
3535

3636
## Prerequisites
3737

38-
- [`Java 11+`](https://www.oracle.com/java/technologies/downloads/#java11)
38+
- [`Java 17+`](https://www.oracle.com/java/technologies/downloads/#java17)
3939
- [`npm`](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
4040
- [`Docker`](https://www.docker.com/)
4141
- [`Docker-Compose`](https://docs.docker.com/compose/install/)
@@ -52,7 +52,7 @@ The goal of this project is to implement an application where a user can manage
5252

5353
The picture below shows how `Okta Admin Dashboard` looks like
5454

55-
![okta-admin-dashboard](documentation/okta-admin-dashboard.png)
55+
![okta-admin-dashboard](documentation/okta-admin-dashboard.jpeg)
5656

5757
### Add Application
5858

@@ -68,19 +68,19 @@ The picture below shows how `Okta Admin Dashboard` looks like
6868
- Assignments
6969
- Controlled access: `Skip group assignment for now`
7070
- Click `Save` button
71-
- On the next screen, the `Client ID` and `Okta Domain` of `Jobs Portal SPA` are displayed.
71+
- On the next screen, the `Client ID` of `Jobs Portal SPA` are displayed. The `Okta Domain` can be obtained by clicking the button-menu present on the up-right corner of the screen.
7272

7373
### Create groups
7474

7575
- In the `Okta Admin Dashboard` main menu on the left, click `Directory` menu and then `Groups` sub-menu
7676
- Add Staff Group
7777
- Click `Add Group` button
7878
- Enter `JOBS_STAFF` for the _Name_ text-field
79-
- Click `Add Group` button
79+
- Click `Save` button
8080
- Add Customer Group
8181
- Click `Add Group` button
8282
- Enter `JOBS_CUSTOMER` for the _Name_ text-field
83-
- Click `Add Group` button
83+
- Click `Save` button
8484

8585
### Add people
8686

@@ -189,10 +189,10 @@ The picture below shows how `Okta Admin Dashboard` looks like
189189
190190
## Applications URLs
191191
192-
| Application | URL |
193-
| ----------- | ------------------------------------- |
194-
| jobs-api | http://localhost:8080/swagger-ui.html |
195-
| jobs-ui | http://localhost:3000 |
192+
| Application | URL |
193+
| ----------- | ------------------------------------------- |
194+
| jobs-api | http://localhost:8080/swagger-ui/index.html |
195+
| jobs-ui | http://localhost:3000 |
196196
197197
## Using jobs-ui
198198
@@ -204,7 +204,7 @@ The picture below shows how `Okta Admin Dashboard` looks like
204204
205205
- Done!
206206
207-
> **Note:** If you are using the person `luigi.bros@test.com`, you will not be able to create/update/delete a job because it doesn't have the required role for it.
207+
> **Note**: If you are using the person `luigi.bros@test.com`, you will not be able to create/update/delete a job because it doesn't have the required role for it.
208208
209209
## Getting Access Token
210210
@@ -244,7 +244,7 @@ In order to use just the `jobs-api` endpoints, you must have an `JWT` access tok
244244
"scope": "openid"
245245
}
246246
```
247-
> **Tip:** In [jwt.io](https://jwt.io), you can decode and verify the `JWT` access token
247+
> **Note**: In [jwt.io](https://jwt.io), you can decode and verify the `JWT` access token
248248
249249
## Calling jobs-api endpoints using curl
250250
@@ -288,19 +288,19 @@ In order to use just the `jobs-api` endpoints, you must have an `JWT` access tok
288288
{"content":[{"id":"uISqEWsBpDcNLtN2kZv3","title":"Expert Java Developer - Cloud","company":"Microsoft","logoUrl"...}
289289
```
290290
291-
> **Note:** If you are using the person `luigi.bros@test.com`, you will not be able to create/update/delete a job because it doesn't have the required role for it.
291+
> **Note**: If you are using the person `luigi.bros@test.com`, you will not be able to create/update/delete a job because it doesn't have the required role for it.
292292
293293
## Using jobs-api with Swagger
294294
295295
- First, get the access token as explained in [`Getting Access Token`](#getting-access-token) section.
296296
297-
- Open `jobs-api` Swagger website http://localhost:8080/swagger-ui.html
297+
- Open `jobs-api` Swagger website http://localhost:8080/swagger-ui/index.html
298298
299299
- Click `Authorize` button. Paste the access token in the `Value` field. Then, click `Authorize` and `Close` to finalize.
300300
301301
- Done! You can now access the sensitive endpoints.
302302
303-
> **Note:** If you are using the person `luigi.bros@test.com`, you will not be able to create/update/delete a job because it doesn't have the required role for it.
303+
> **Note**: If you are using the person `luigi.bros@test.com`, you will not be able to create/update/delete a job because it doesn't have the required role for it.
304304
305305
## Shutdown
306306

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: "3.8"
33
services:
44

55
elasticsearch:
6-
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.3
6+
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.4
77
container_name: elasticsearch
88
restart: unless-stopped
99
ports:
79.1 KB
Loading
-204 KB
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.4/apache-maven-3.8.4-bin.zip
1+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.6/apache-maven-3.8.6-bin.zip
22
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar

jobs-api/pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.springframework.boot</groupId>
77
<artifactId>spring-boot-starter-parent</artifactId>
8-
<version>2.7.0</version>
8+
<version>2.7.3</version>
99
<relativePath/> <!-- lookup parent from repository -->
1010
</parent>
1111

@@ -16,11 +16,11 @@
1616
<description>Demo project for Spring Boot</description>
1717

1818
<properties>
19-
<java.version>11</java.version>
20-
<okta-spring.version>2.1.5</okta-spring.version>
21-
<org.mapstruct.version>1.4.2.Final</org.mapstruct.version>
19+
<java.version>17</java.version>
20+
<okta-spring.version>2.1.6</okta-spring.version>
21+
<org.mapstruct.version>1.5.2.Final</org.mapstruct.version>
2222
<lombok-mapstruct-binding.version>0.2.0</lombok-mapstruct-binding.version>
23-
<springdoc-openapi.version>1.6.9</springdoc-openapi.version>
23+
<springdoc-openapi.version>1.6.11</springdoc-openapi.version>
2424
</properties>
2525

2626
<dependencies>

jobs-api/src/main/java/com/mycompany/jobsapi/config/RequestLoggingFilterConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
public class RequestLoggingFilterConfig {
99

1010
@Bean
11-
CommonsRequestLoggingFilter logFilter() {
11+
public CommonsRequestLoggingFilter logFilter() {
1212
CommonsRequestLoggingFilter filter = new CommonsRequestLoggingFilter();
1313
filter.setIncludeClientInfo(true);
1414
filter.setIncludeHeaders(true);

jobs-api/src/main/java/com/mycompany/jobsapi/security/CorsConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
public class CorsConfig {
1414

1515
@Bean
16-
CorsFilter corsFilter(@Value("${app.cors.allowed-origins}") List<String> allowedOrigins) {
16+
public CorsFilter corsFilter(@Value("${app.cors.allowed-origins}") List<String> allowedOrigins) {
1717
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
1818
CorsConfiguration config = new CorsConfiguration();
1919
config.setAllowCredentials(true);

jobs-api/src/main/java/com/mycompany/jobsapi/security/WebSecurityConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
public class WebSecurityConfig {
1111

1212
@Bean
13-
SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
13+
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
1414
http.authorizeRequests()
1515
.antMatchers(HttpMethod.POST, "/callback/token").permitAll()
1616
.antMatchers(HttpMethod.GET, "/actuator/**").permitAll()

0 commit comments

Comments
 (0)