|
4 | 4 |
|
5 | 5 | ## What is this? |
6 | 6 |
|
7 | | -This is a sample project demos how to use JWT token based authentication to protect the RESTful APIs in a Spring WebMVC application. |
| 7 | +This is a sample project that demonstrates how to use JWT token-based authentication to protect RESTful APIs in a Spring Web MVC application. |
8 | 8 |
|
9 | | -> If you are interested in the new variant built with the Spring WebFlux stack, check [spring-reactive-jwt-sample](https://github.com/hantsy/spring-reactive-jwt-sample/) for more details. |
| 9 | +> |
| 10 | +> [!note] |
| 11 | +>If you are interested in the new variant built with the Spring WebFlux stack, check [spring-reactive-jwt-sample](https://github.com/hantsy/spring-reactive-jwt-sample/) for more details. |
10 | 12 |
|
11 | 13 | ## Guide |
12 | 14 |
|
13 | | -Check the [step-by-step GUIDE](./GUIDE.md) to get the detailed explanation of the example codes. |
| 15 | +Please refer to the [step-by-step guide](./GUIDE.md) for a detailed explanation of the example codes. |
14 | 16 |
|
15 | | -> The original codes were written in Spring Boot 2.0, there are some slightly difference in the main/master branch due to the changes brought in the latest Spring Boot 3.0. |
| 17 | +> The original code was written in Spring Boot 2.0. There are some slight differences in the main/master branch due to the changes introduced in the latest Spring Boot 3.x. |
16 | 18 |
|
17 | 19 | ## Prerequisites |
18 | 20 |
|
19 | | -Make sure you have installed the following software. |
| 21 | +Please ensure that you have installed the following software. |
20 | 22 |
|
21 | | -* Java 17 |
22 | | -* Apache Maven 3.6.x |
| 23 | +* Java 21 |
| 24 | +* Apache Maven 3.9.x/4.0.0+ |
23 | 25 | * Docker |
24 | 26 |
|
25 | | -## Build |
| 27 | +## Build |
26 | 28 |
|
27 | | -Clone the source codes from Github. |
| 29 | +Clone the source code from GitHub. |
28 | 30 |
|
29 | 31 | ```bash |
30 | 32 | git clone https://github.com/hantsy/spring-webmvc-jwt-sample |
31 | 33 | ``` |
32 | 34 |
|
33 | | -Open a terminal, and switch to the root folder of the project, and run the following command to build the whole project. |
| 35 | +Open a terminal, switch to the project's root folder, and run the following command to build the entire project. |
34 | 36 |
|
35 | 37 | ```bash |
36 | | -docker-compose up postgres // start up a postgres |
| 38 | +docker compose up postgres // start up a postgres |
37 | 39 | mvn clean install // build the project |
38 | 40 | ``` |
39 | 41 |
|
40 | | -Run the application. |
| 42 | +Please proceed with executing the following command to run the application. |
41 | 43 |
|
42 | 44 | ```bash |
43 | | -mvn spring-boot:run |
44 | | -// or from command line after building |
| 45 | +mvn spring-boot: run |
| 46 | +// or from the command line after building |
45 | 47 | java -jar target/xxx.jar |
46 | 48 | ``` |
47 | 49 |
|
48 | | - |
49 | 50 | ## Contribution |
50 | 51 |
|
51 | | -Any suggestions are welcome, filing an issue or submitting a PR is also highly recommended. |
| 52 | +Any suggestions are welcome, filing an issue or submitting a PR is also highly recommended. |
| 53 | + |
0 commit comments