Giter Club home page Giter Club logo

java-app-example's Introduction

Introduction

Sample Java Web Application with Redis, MariaDB.

Database 및 계정 생성

create database sample default character set utf8 collate utf8_unicode_ci;
create user 'test'@'%' identified by 'test00';
grant all privileges on sample.* to 'test'@'%' with grant option;

테이블 생성 및 초기 샘플 데이터

CREATE TABLE USER
(
    USER_ID VARCHAR(100) PRIMARY KEY NOT NULL,
    USER_AGE INT(11) DEFAULT 'NULL',
    USER_GENDER VARCHAR(20) DEFAULT 'NULL',
    USER_NAME VARCHAR(50) DEFAULT 'NULL',
    USER_STATUS VARCHAR(20) DEFAULT 'NULL'
);

insert into USER (USER_ID, USER_AGE, USER_GENDER, USER_NAME, USER_STATUS) values ('test01', 25, 'MALE', 'Tester 1', 'ACTIVE');
insert into USER (USER_ID, USER_AGE, USER_GENDER, USER_NAME, USER_STATUS) values ('test02', 31, 'FEMALE', 'Tester 2', 'INACTIVE');
insert into USER (USER_ID, USER_AGE, USER_GENDER, USER_NAME, USER_STATUS) values ('test03', 33, 'FEMALE', 'Tester 3', 'ACTIVE');
insert into USER (USER_ID, USER_AGE, USER_GENDER, USER_NAME, USER_STATUS) values ('test04', 27, 'FEMALE', 'Tester 4', 'ACTIVE');
insert into USER (USER_ID, USER_AGE, USER_GENDER, USER_NAME, USER_STATUS) values ('test05', 21, 'MALE', 'Tester 5', 'ACTIVE');
insert into USER (USER_ID, USER_AGE, USER_GENDER, USER_NAME, USER_STATUS) values ('test06', 38, 'MALE', 'Tester 6', 'INACTIVE');
insert into USER (USER_ID, USER_AGE, USER_GENDER, USER_NAME, USER_STATUS) values ('test07', 45, 'FEMALE', 'Tester 7', 'ACTIVE');
insert into USER (USER_ID, USER_AGE, USER_GENDER, USER_NAME, USER_STATUS) values ('test08', 42, 'MALE', 'Tester 8', 'ACTIVE');
insert into USER (USER_ID, USER_AGE, USER_GENDER, USER_NAME, USER_STATUS) values ('test09', 34, 'MALE', 'Tester 9', 'ACTIVE');
insert into USER (USER_ID, USER_AGE, USER_GENDER, USER_NAME, USER_STATUS) values ('test10', 29, 'FEMALE', 'Tester 10', 'BLOCK');

Docker Build

docker build --network=host -t java-sample:latest .

Docker Run

docker run \
-d --name sample-app \
-p 38080:8080 \
-e DB_HOST=exntu.kr \
-e DB_PORT=33306 \
-e REDIS_HOST=exntu.kr \
-e REDIS_PORT=26379 \
java-sample:latest 

java-app-example's People

Contributors

bluejaya avatar dependabot[bot] avatar jamie-lee-exntu avatar robertchoi80 avatar seungkyua avatar steve-kyungjin avatar

Stargazers

 avatar

Watchers

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