Git Product home page Git Product logo

musicincstore's Introduction

MusicIncStore

Sample music exhibition and ecommerce portal

This repository contains a sample application developed for learning purpose for exihibition and sale of audio songs sung by various artists around the world.

App runtime environment:

OpenJDK 11
Apache Tomcat 9.0.37
Spring 5
Hibernate 5
MariaDB 10.3- the default MySQL on Debian based linux distributions

The datasource is taken from JNDI via Tomcat. Tomcat by default does not have a feature to encrypt passwords for databases in it's configuration files. Hence it has to be manually setup.I have used a readily available solution in github:

			https://github.com/k-tamura/encrypt-db-password

I forked the above repository to github, followed the instructions from the original repository and built the jar. Then placed the jar in lib folder of Tomcat.The name of the built jar is - encrypt-db-password-1.0.0.jar

The resulting datasource configuration can be added in context.xml file of Tomcat, like below :

Example Datasource configuration:
Please see sample context.xml provided in this repository.

Also place the MariaDB JDBC driver jar in the lib folder of Tomcat. The MariaDB connector jar to be placed is:

mariadb-java-client-2.7.3

To build: mvn clean install

You can use any Java supported OS,IDE or application server for developing this project. I have used the below for my development environment:

OS: MX Linux

JDK: OpenJDK 11 provided by MX Linux

Database : Maria DB 10.3 - default MySQL version provided by MX Linux

Java IDE: Eclipse 2021-03

REST Client for Testing API : POSTMAN

Database IDE: SQLYog Community Edition - used via WINE

Application Server: Apache Tomcat 9.0.37

If you wish to use MySQL instead of MariaDB then please do the following:

1.Place the MySQL JDBC driver jar in the ib folder of Tomcat

2.Under src/main/resources open app.properties and update the hibernate dialect key: Replace
hibernate.dialect.value = org.hibernate.dialect.MariaDB103Dialect
with
hibernate.dialect.value = org.hibernate.dialect.MySQL8Dialect(MySQL 8)
or
hibernate.dialect.value = org.hibernate.dialect.MySQL57Dialect(MySQL 5.7)

3. Update the JDBC driver name in the tomcat JNDI datasource configuration in context.xml. See sample context.xml for more details.

Application architecture/Technology Stack:

This application is built for an Angular frontend, hence consists of services to be provided in response to requests from Angular.

REST API layer: Spring MVC.

Service/DAO layers:Spring POJO beans

MapStruct is used for DTO-JPA Entity mapping and vice-versa and Jackson is used for JSON marshalling/unmarshalling.

musicincstore's People

Contributors

knextsunj avatar

Watchers

James Cloos avatar  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.