Git Product home page Git Product logo

mfp-spring-adapter's Introduction

mfp-spring-adapter

Introduction

  1. This a sample project for IBM MobileFirst Platform + Spring + Hibernate/JPA + MySQL

Prequisite

  1. Installed Java JDK 1.8.x
  2. Installed MySQL 8.x.x and create a local database connection.
  3. Installed Apache Maven 3.6.x
  4. Installed any preferred IDE. Recommended to use Eclipse 2019-03.
  5. Installed Apache Lombok 1.x.x in IDE.
  6. Git clone and setup https://github.com/yousoff92/spring-hibernate
  7. Installed IBM MobileFirst Platform http://mobilefirstplatform.ibmcloud.com/downloads/

Getting Started

Setup spring-hibernate

  1. cd to spring-hibernate and execute mvn clean install to generate jar file.
  2. Generate the jar file again if we do any changes in the project.

Setup IBM MobileFirst Platform

  1. cd to ../mfp-server/usr/servers/mfp
  2. Open IBM MFP server.xml and add the following lines :
    <!-- Yousoff: Added configuration for JDBC -->
    <!-- Ref : https://www.ibm.com/support/knowledgecenter/SSD28V_9.0.0/com.ibm.websphere.wlp.core.doc/ae/twlp_dep_configuring_ds.html -->
    <!-- Must specify Datasource -->
    <dataSource id="DefaultDataSource" jndiName="jdbc/mysql" type="javax.sql.DataSource">
        <jdbcDriver libraryRef="MySQLLib" javax.sql.DataSource="com.mysql.cj.jdbc.MysqlDataSource"/>
        <properties url="jdbc:mysql://localhost:3306/mydb?useSSL=false&amp;allowPublicKeyRetrieval=true" user="root" password="password"/>
    </dataSource>

    <library id="MySQLLib">
        <file name="/home/yousoff/Documents/library/mysql-connector-java-8.0.11.jar"/>
    </library>
  1. Modify the JDBC URL and point the MySQL Connector jar file to the correct path.
  2. In terminal, execute the run.sh to start local MFP server at http://localhost:9080/mfpconsole

Setup mfp-spring-adapter

  1. cd to mfp-spring-adapter project and build adapter by executing mvn clean install
  2. Deploy to local MFP by executing mvn adapter:deploy

Troubleshoot

  1. Make sure MySQL Connector version match your local MySQL DB version. Let say your DB is 5.x.x, then change then server.xml to 5.x.x.

mfp-spring-adapter's People

Contributors

yousoff92 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.