Skip to content

mpechkurov/taskmanager

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

taskmanager

A spring4 + Angular exercise bulding a task management website

Architecture

architecture

you can have a look at a live drawing here.

Requirements

  • git
  • JDK8
  • Maven3
  • Postgresql
  • Docker

Build

Building with maven

Clone this repo and build first the web modules: endpoints, service, persistance. Note that the latter 2 are shared also with the scheduler.

#$ mvn clean install -Pweb
#$ mvn eclipse:clean eclipse:eclipse -Pweb

Then build the scheduler:

#$ mvn clean install -Pscheduler
#$ mvn eclipse:clean eclipse:eclipse -Pscheduler

If you want also to produce the Docker images for both components add the profile docker e.g.

#$ mvn clean install -Pscheduler,docker

Run

Database configuration

Long story short: create the Postgres database described below and then skip to Option1 or Option2

  • name taskmanager
  • on localhost
  • port 5432
  • user postgres
  • password postgres

Here hare some more details...

the database connection params are stored in

<root_repo>\endpoints\src\main\resources\application.properties

<root_repo>\tasks-manager\scheduler\src\main\resources\application.properties

and by default are configured for postgres, the web component is set to CREATE-DROP and the scheduler to VALIDATE. So the former must be executed before the latter.

If you don't use the dockerized environment (Options 1 and 2) you have to take care on configure a postgres instance (or drop all the postgres properties and use H2 in memory)

Option 1 - download and run the jar files

  • Download the web and the scheduler jar files
  • Create the database as described in Database configuration
  • place them in a convinient location and the run java -jar first web then scheduler module.

Option 2 - run from eclipse

  • Create the database as described in Database configuration
  • Run the classes EndpointsMain and SchedulerMain. It can be done eclipse after having imported the project or directly from the command line.

OPTION 3 - run via docker-compose

  • Change value of localhost/127.0.0.1 to db in files:
<root_repo>\endpoints\src\main\resources\application.properties

<root_repo>\tasks-manager\scheduler\src\main\resources\application.properties
  • Produce docker image for both profiles
#$ mvn clean install -Pweb,docker
#$ mvn clean install -Pscheduler,docker

Run Integration tests

  • Run DB
  • Run local env
  • Open IDE run test
  • //TODO create maven configuration to run unit test.

preview

About

A spring exercise bulding a task management website

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Java 81.1%
  • HTML 17.3%
  • CSS 1.6%