https://github.com/sswguo/springboot-um
Spring boot sample REST services
https://github.com/sswguo/springboot-um
docker-compose microservice springboot
Last synced: 3 months ago
JSON representation
Spring boot sample REST services
- Host: GitHub
- URL: https://github.com/sswguo/springboot-um
- Owner: sswguo
- Created: 2019-08-05T07:35:59.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-11-16T12:29:52.000Z (over 3 years ago)
- Last Synced: 2025-01-19T08:46:51.245Z (about 1 year ago)
- Topics: docker-compose, microservice, springboot
- Language: Java
- Homepage:
- Size: 78.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
README
## Springboot Demo
You need to have the following tools installed.
- java8
- maven3
- docker
- docker-compose
### Services
- User service
- Notification service
- Fake SMTP Server
### Howto Run
Clone the project
```
git clone https://github.com/sswguo/springboot-um.git
```
Build projects
```
mvn clean install
```
Run docker-compose to build images and start containers
```
docker-compose up --build
```
Check the started containers
```
docker-compose ps
Name Command State Ports
---------------------------------------------------------------------------------------------------------------------------
springboot-um_notification_1 java -jar notification-0.0 ... Up 0.0.0.0:8087->8080/tcp
springboot-um_springboot-um_1 java -jar springboot-um-0. ... Up 0.0.0.0:8080->8080/tcp
springboot-um_fake_mail_server_1 sh -c java $JAVA_OPTS -Dja ... Up 0.0.0.0:5025->5025/tcp, 0.0.0.0:5080->5080/tcp, 0.0.0.0:5081->5081/tcp
```
### RestAPI
```
http://localhost:8080/swagger-ui.html
```
### Rest Test
```
cd springboot-um
curl -d "@data/users_req.json" -H "Content-Type: application/json" -X POST http://localhost:8080/user/register
```
Check the users:
```
http://localhost:8080/user/all
```
And check the emails in the fake mail server
```
http://localhost:5080/
```