Skip to content

Commit 44ed279

Browse files
committed
Adding readme imgs
1 parent 11bb5e7 commit 44ed279

File tree

1 file changed

+36
-1
lines changed

1 file changed

+36
-1
lines changed

README.md

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,39 @@
11
# spring-boot-based-microservices
22

3-
Basic skeleton for Spring Boot Microservices. It includes spring spring security for basic Auth. Spring cloud gateway is also implemented as an Edge Service. Lots of the spring cloud component integrated.
3+
Basic skeleton for Spring Boot Microservices. It includes spring security for basic Auth. Spring cloud gateway is also implemented as an Edge Service. Lots of the spring cloud component integrated.
44

5+
# How to run
6+
7+
- Navigate to root of the project
8+
```
9+
cd spring-boot-based-microservices
10+
```
11+
- Build the project
12+
```
13+
mvn clean package -DskipTests
14+
15+
![Maven Build](https://github.com/Nasruddin/spring-boot-based-microservices/blob/master/images/build.png?raw=true)
16+
17+
18+
```
19+
- Locate the docker directory from the root directory and run docker compose to startup the containers
20+
```
21+
cd docker && docker-compose up --build
22+
```
23+
- Let's check if all the services are up and running. We will reach to eureka server using gateway.
24+
Open the browser and hit http://localhost:8443/eureka/web You will need to authenticate yourself before accessing the endpoint.
25+
```
26+
username : user
27+
password : password
28+
```
29+
- Now, we have a look at our gateway endpoints configurations as well. Hit http://localhost:8443/actuator/gateway/routes in the browser again and
30+
you should be able to find all the routes configured.
31+
32+
- Coming to swagger/openapi specs, here is the address to access them - http://localhost:8443/openapi/swagger-ui.html
33+
34+
- Please use the below curl to generate the access token with both read and write scope.
35+
```
36+
curl -k http://writer:secret-writer@localhost:8443/oauth2/token -d grant_type=client_credentials -d scope="course:read course:write"
37+
```
38+
39+
## Note : Currently this project uses Spring Authorization server. Keep in mind, I'm planning to enhance the whole OAuth flow because it's in shaky state right now and, you may some face issues. We may also move to keycloak.

0 commit comments

Comments
 (0)