Coder Social home page Coder Social logo

danielbgg / jee-hello-world-db Goto Github PK

View Code? Open in Web Editor NEW

This project forked from maltron/helloworlddb

0.0 1.0 1.0 107 KB

A simple application in Java EE 7, which responds to REST requests and fetches from a Database

Java 100.00%
java javaee eap redhat

jee-hello-world-db's Introduction

Hello World DB

Description

A simple application in Java EE 7, which responds to REST requests and fetches from a Database.

Requirements

  • Wildfly with MySQL datasource. Example: kerdlix/wildfly-alpine-mysql

Setup

Create a Docker MySQL instance:

docker run --name mysqlHelloWorldDB -e MYSQL_ROOT_PASSWORD=redhat@123 -e MYSQL_DATABASE=test -e MYSQL_USER=redhat -e MYSQL_PASSWORD=redhat@123 -p 3306:3306  -d mysql:latest

Run the database script.

Build

mvn clean package
docker build --rm --tag=kerdlix/docker-wildfly-hello-world-db .

Run

docker run -it -p 8080:8080 -p 9990:9990 -e DATASOURCE_CONNECTION=jdbc:mysql://mysqlHelloWorldDB:3306/test -e DATASOURCE_USERNAME=redhat -e DATASOURCE_PASSWORD=redhat@123 --link mysqlHelloWorldDB:mysqlHelloWorldDB kerdlix/docker-wildfly-hello-world-db

HTTP Calls

http://localhost:8080/1
http://localhost:8080/2

References

jee-hello-world-db's People

Contributors

danielbgg avatar maltron avatar

Watchers

 avatar

Forkers

viveksundar5

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.