Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nhatthaiquang-agilityio/spring-reactive-rest-api
Spring Reactive, Restful API and MongoDB
https://github.com/nhatthaiquang-agilityio/spring-reactive-rest-api
mongodb spring-boot spring-reactive
Last synced: about 1 month ago
JSON representation
Spring Reactive, Restful API and MongoDB
- Host: GitHub
- URL: https://github.com/nhatthaiquang-agilityio/spring-reactive-rest-api
- Owner: nhatthaiquang-agilityio
- Created: 2018-01-02T03:59:41.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-09T07:18:16.000Z (almost 7 years ago)
- Last Synced: 2024-04-16T07:09:42.347Z (9 months ago)
- Topics: mongodb, spring-boot, spring-reactive
- Language: Java
- Homepage:
- Size: 11.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Build Reactive Rest APIs with Spring and MongoDB
# Requirements
Install mongodb on docker
Java: JDK 1.8
Maven Build# MongoDB
### Install mongodb on docker
```
docker-compose up
```Check mongodb status
```
docker ps
```Connect to mongodb
```
mongo 127.0.0.1:27017
```Check config mongodb
src/main/resource/application.properties# Integration Tests
An integration test based on Spring's WebTestClientTesting api with basicAuthentication
# Usage
[Create application from Spring Initializr](http://start.spring.io/)Add dependencies: Reactive Web, Reactive MongoDB, Security
Spring Security on your class path and then spring security is automatically configured with a default user and generated password
User: user
Password was generated in Console```
Using default security password: 32fd0ac8-ba12-4978-ae28-0cea0dfd636e
```### Security Config
Config username and password in SecurityConfig.java### Command
Clean
```
mvn clean
```Build
```
mvn package
```Test
```
mvn test
```Run
```
mvn spring-boot:run
```