GithubHelp home page GithubHelp logo

tanbinh123 / flightairserviceapi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from uayturk/flightairserviceapi

0.0 1.0 0.0 1.45 MB

FlightAirServiceApi RESTful service with SpringBoot as backend,MongoDb as Database.

Java 100.00%

flightairserviceapi's Introduction

ASSESMENT


FlightAirServiceApi is the RESTful service Api with embedded apache tomcat as servlet container. It use Java / Spring Boot as Back-End, Jquery, Jsp as Front-End, MongoDB as Database and I designed this project to use and show some of nice Spring Boot features technically which is like CORS Support(uses for Security), Cacheable, TextIndexed(uses for Searching) and Reflection. Application is implemented using Intellij IDEA Environment. FlightAirServiceApi is use Flightstats which is an api that returns information of airports and airlines around the world as JSON. FlightAirService sends request for getting JSON data to the Flightstats Api. It gets all values and save to the MongoDB.

RUN

Firstly,you should complete installation of MongoDB before the running my service, afterwards you need to package it with;

mvn clean package

If you wanna change default configuration,parameters set in src/main/resources/application.properties you need to give a new properties file with the following parameter;

java -jar target/assessment-1.0.0-SNAPSHOT.jar --spring.config.location=file:////home/ufuk/my_application.properties

Swagger UI


By default this assesment will be executed on 8080 port and you'll see the entire endpoints from http://localhost:8080/flightAirService/swagger-ui.html

IDE


For this service we used smart IDE intellij and you can easily start our spring boot application from src/main/java/com.ufuk.flightAirServiceApi/FlightAirServiceApplication class.

What You'll See In My Project


App is using datas from https://developer.flightstats.com/api-docs/flightstatus/v2 . This api returns pure airports/airlines informations. What you can do with my FlightAirServiceApi:

  • Get active/inactive airports/airlines.

  • Get airports/airlines by code.

  • Get airports/airlines by City code.

  • Get airports/airlines by Iata code.

  • Get airports/airlines by Icao code.

  • Get airports/airlines by city.

  • Get airports/airlines by country name.

  • Get airports/airlines by code.

  • Get active/inactive airports/airlines by country name.

Useful Features That Have Been Used

  • Spring Boot - CORS Support : Cross-Origin Resource Sharing (CORS) is a security concept that allows restricting the resources implemented in web browsers. It prevents the JavaScript code producing or consuming the requests against different origin

  • Spring Boot - @cacheable : Caching is a mechanism to enhance the performance of a system. It is a temporary memory that lies between the application and the persistent database. Cache memory stores recently used data items in order to reduce the number of database hits as much as possible.

  • Search : Also you will find how to search items on backendside. @TextIndexed annotation used. Check searchObjects method.

  • Reflection : You can find Reflection property of Java.You can handle with missing or null equal fields.In this Api,I used " Field declaredField ". It means that returns an array of Field objects reflecting all the fields declared by the class or interface represented by this Class object. This includes public, protected, default (package) access, and private fields, but excludes inherited fields.

flightairserviceapi's People

Contributors

uayturk avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.