Giter Club home page Giter Club logo

itunes-library-service's Introduction

itunes-library-service

This Spring Boot microservice is designed to work with iTunes media library (tracks, albums and artists).


Database initialization

Microservice database can be initialized in two ways.

Parse data from XML file
  1. Save XML media library form iTunes application;
  2. Put the XML file in resource folder (itunes-library-service-impl/src/main/resources/library.xml);
  3. Enable parsing by setting itunes-library-service.startup-parsing to true in application.xml;
  4. Run the application.
Use predefined schema and data
  1. Disable parsing of the file-based library by setting itunes-library-service.startup-parsing to false in application.xml;
  2. Create a new database in PostgreSQL, e.g. itunes-library with required login and password;
  3. Set URL to the created database in properties, e.g. spring.datasource.url=jdbc:postgresql://localhost:5432/itunes_library;
  4. Create new schema inside the specified database, e.g. library and set it in properties: spring.jpa.properties.hibernate.default_schema: library;
  5. Preapre SQL scripts with data t be populated. Current Entity Relation diagram is: diagram
  6. Save SQL scripts in resource folder (e.g. resources/sql) and set paths:
  • schema.sql - spring.datasource.schema=classpath:sql/schema.sql;
  • data itself - spring.datasource.data=classpath:classpath:sql/artists.sql, classpath:sql/albums.sql, classpath:sql/tracks.sql, classpath:sql/trackdiscinfo.sql;
  1. Run the application.

Database selection

The microservice can work with h2 (embedded or file-based) database and PostgreSQL as well. To select a required database type run the application with proper profile (dev-h2 or dev-pg respectively, see application.xml for more details).

API documentation

API documentation for running server by default is available here:

itunes-library-service's People

Contributors

unrec avatar

Watchers

 avatar

itunes-library-service's Issues

add /info endpoint

endpoint should provide basic information about the library:

  • total albums,
  • total tracks,
  • total size of tracks
  • count of top rated tracks, unrated tracks etc

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.