https://github.com/zoltan-nz/spring-mongo
https://github.com/zoltan-nz/spring-mongo
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/zoltan-nz/spring-mongo
- Owner: zoltan-nz
- Created: 2019-04-20T06:11:40.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-04-21T13:04:09.000Z (over 6 years ago)
- Last Synced: 2025-01-22T02:46:05.824Z (9 months ago)
- Language: Kotlin
- Size: 59.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Server side app using Spring Boot with Kotlin, Gradle, MongoDB, in async, reactive style
Features:
- Reactive, async implementation
- MongoDB database
- JUnit 5
- Gradle KotlinReading list:
- [Painless Spring boot tutorial with Maven Kotlin & MongoDB](https://medium.com/mariano-z-lopez/painless-spring-boot-tutorial-with-maven-kotlin-mongodb-18c11a08aaae)
- [Reactive Flow with MongoDB, Kotlin, and Spring WebFlux](https://www.baeldung.com/kotlin-mongodb-spring-webflux)## Development Experience Notes
Turn on auto rebuild and live reload
Run build with `--continuous` or `-t` option in one of the terminals.
```shell
$ gradle build --continuous --warning-mode all --parallel
```In a separate terminal run the app
```shell
$ gradle runBoot
```Turn on LiveReload in Chrome. Install LiveReload Chrome Extension, open Developer Console and activate LiveReload with clicking on its icon.
## Implementation steps
- Response for home page with `It's live message`
- Add `Configuration` to enable reactive MongoDB support (`ReactiveMongoConfiguration.kt`)
- Enable bean overriding support in `application.properties`
- Create Entities (models)
- Create Repositories (stores)## Data Model
Product
```
id
name
price
```Transaction
```
id
product_id
time_stamp
quantity
```