REST API to retrieve continents, countries information
RESTful API to retrieve continents, countries information
Clone the application
git clone https://github.com/arivuselvanchinnasamy/countries-api.git
Create Mysql database
create database countries
Change mysql username and password as per your installation
open src/main/resources/application.properties
change spring.datasource.username and spring.datasource.password as per your mysql installation
Build and run the app using maven
mvn package
java -jar target/countries-api-0.0.1-SNAPSHOT.jar
Alternatively, you can run the app without packaging it using -
mvn spring-boot:run
The app will start running at http://localhost:8081
The app defines following APIs.
GET /api/v1/continents
GET /api/v1/continents/{code}
For ex: /api/v1/continents/AF
GET /api/v1/countries
GET /api/v1/countries/{code}
For Ex: /api/v1/countries/IN