This project get the AI analyzed stats data from couchbase and publish it thru springboot api.
- springboot rest data
- springboot data couchbase
- Couchbase DB
- Docker and docker-compose
Use couchbase docker image to start the couchbase DB. Official Docker image for couchbase is Docker Couchbase repo
docker login
- login to Docker hub - use the profile name for username not the email id.docker pull couchbase
- this will pull the latest versiondocker run -d --name db -p 8091-8094:8091-8094 -p 11210:11210 couchbase
- Run coucnhbase db in port 8091- Setup bucket and create user for the bucket (Important : user name and the bucket name should be same)
./gradlew build
to build the jar (-x test
to exculde test task)./gradlew bootRun
orjava -jar ./build/libs/stats-ai*.jar
Method | API | Request | Response |
---|---|---|---|
GET | api/v1/stats | localhost:8080/api/v1/stats | [{"id":"statsai::1","name":"TESLA","stockId":"TSLA","suggestion":"BUY","updates":[]},{"id":"statsai::2","name":"TCS","stockId":"TCS","suggestion":"BUY","updates":[]}] |
GET | api/v1/stats/{name} | localhost:8080/api/v1/stats/TCS | {"id":"statsai::2","name":"TCS","stockId":"TCS","suggestion":"BUY","updates":[]} |
POST | api/v1/stats | localhost:8080/api/v1/stats Header: {"id":"statsai::1","name":"TESLA","stockId":"TSLA","suggestion":"BUY","updates":[ |
{"id":"statsai::1","name":"TESLA","stockId":"TSLA","suggestion":"BUY","updates":[ |
- unit test
- add logback-spring and access
- gitlab-ci or jenkins pipeline
- Openshift deploy config setup
- integration test case