This application used to save the Suburban details to MySQL DB and find the ranges of postcodes suburban names and combine all names total length from the result of given ranges of postal codes.
- Save the suburban details Please use this below url and refer below the sample data and the ID should be unique as this is primary hkey and it is autogenerated id.
localhost:8080/v1/suburb/suburbDetail
[ { "suburbName": "DAGGAR HILLS,WA",
"postcode": 6638
},
{
"suburbName": "LAKE POWELL,VIC",
"postcode": 3597
}
]
Fetch the Suburban Details from MYSQL DB for given two post code ranges and find length of combination of suburban names for the given range of post code results
- Fetch the data for the given ranges of two post codes and it should be sorted alphabetically and find the total length of the combinationa of all the urban names of the given post code ranges result data.
localhost:8080/v1/suburb/suburblist/4805/4860
{ "sortedListBySuburbNames": [ { "suburbId": 15, "suburbName": "O'BRIENS HILL,QLD", "postcode": 4860 }, { "suburbId": 13, "suburbName": "QUEENS BEACH,QLD", "postcode": 4805 } ], "combinedSuburbNameLength": 33 }Please set the following grant permission using these below commands
docker ps
docker exec -it /bin/bash
mysql -u root -p
The percent sign (%) means all ip's. Restart the docker container.
grant all privileges on . to 'jegadeesh'@'%' with grant option;
flush privileges;



