Skip to content

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jdbc_test_task

Simple Java app with Postgres database(via JDBC).

Table of contents

Introduction

Simple Java + Postgresql (inside docker container) application, where you can search by names of customers and get some stats.

Requirements

App can be run locally, requirements a listed below.

Local

Quick start

Configure database

Build docker image

$ docker build -t test_task .

Start container with environment arguments.

$   docker run -d --name ai_test -p 5433:5432 -e POSTGRES_PASSWORD=qwerty -e POSTGRES_USER=postgres -e POSTGRES_DB=task test_task:latest

By default app works with POSTGRES_PASSWORD=qwerty, POSTGRES_USER=postgres and POSTGRES_DB=task. Postgres database started on port 5432 (you can specify external port :)).

Run app

$ mvn clean package
$ java -jar target/TestTask-1.0-SNAPSHOT.jar search input.json output.json

or

$ java -jar target/TestTask-1.0-SNAPSHOT.jar stats input.json output.json

How to work with it

Some testcases are in src/main/resources/testcases directory. You can copy it into input.json and run it to see how app works. Result will be in output.json.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages