REST backend for lost pets announcements application.
- create directory structure
data/db
- run mongoDb with command
mongod --dbpath=data/db
- open root directory of
petfinder
project - run
./gradlew bootRun
To play with API install Postman and import postman collection(frompostman
directory) into Postman app.
run ./heroku-staging.sh
run heroku logs -a petfinder-yy
run heroku run bash -a petfinder-yy
Install heroku plugin ~~heroku plugins:install heroku-cli-java~~
and then you can run following commands:
heroku java:jconsole -a petfinder-yy
heroku java:visualvm -a petfinder-yy
heroku java:jmap -a petfinder-yy
heroku java:jstack -a petfinder-yy
It may be the case that for visualvm this command is needed:
jvisualvm -J-DsocksProxyHost=localhost -J-DsocksProxyPort=1080 --openjmx=:1099
fucking visualvm: jvisualvm -J-DsocksProxyHost=localhost -J-DsocksProxyPort=1080 --openjmx=:1098
https://devcenter.heroku.com/articles/dynos#cli-commands-for-dyno-management
- unstable test SpotAdControllerTest.testSpotAdCreationNotifiesPetAdsOwners
- to think about id in db
- logging
- password validation(min length for example)
- lombok @NonNull accepts empty string. Validate for empty string where needed.
When ad is created, CV determines breed. It can be array which is assigned to cvDefinedBreed field of petAd. Then the one who found pet, will take a picutre, CV will derive pet's breed(as array probably) and normal search request will be sent with additional cvDefinedBreed field.