https://github.com/aymen94/springboot-openapi-mongodb
Example project with Java, Maven, Spring Boot, JUnit, Docker and OpenAPI 3.0 specification
https://github.com/aymen94/springboot-openapi-mongodb
Last synced: 8 months ago
JSON representation
Example project with Java, Maven, Spring Boot, JUnit, Docker and OpenAPI 3.0 specification
- Host: GitHub
- URL: https://github.com/aymen94/springboot-openapi-mongodb
- Owner: aymen94
- License: apache-2.0
- Created: 2020-04-09T00:03:15.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-08-26T16:38:44.000Z (over 1 year ago)
- Last Synced: 2025-04-18T16:27:23.004Z (8 months ago)
- Language: Java
- Homepage:
- Size: 15.6 KB
- Stars: 4
- Watchers: 1
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Spring boot application with OpenAPI Specification and MongoDB
Example project with java, Maven, Spring Boot, JUnit, Docker and OpenAPI 3.0 specification
* Java 1.8 or above
* Spring Boot with embedded Tomcat
* Swagger
* MongoDB
* Maven
* Docker
## Clone
Clone this repo to your local machine using:
```
git clone https://github.com/aymen94/springboot-openapi-mongodb
```
## Config MongoDB
* setup configuration of MongoDB in src/main/resources/application.yaml
* or use Docker container [mongo-alpine](https://hub.docker.com/r/aymen94/mongodb-alpine/)
## How to start the app
To campile application you can use Mavne with command:
```
mvn clean package
```
run package with java command:
```
java -jar target/mywebserviceapp-0.0.1-SNAPSHOT.jar
```
or use Docker:
```
docker build .
```
Or you can compile and run with Maven command:
```
mvn spring-boot:run
```
after followed above command, the web server is started at the http://localhost:8080.
# Useful commands
Useful cURL or Postman to test. It can be tested with swagger also: http://localhost:8080/swagger-ui.html