/crud-application

Crud Web Application Example using DAOs and Servlets

Primary LanguageJavaGNU General Public License v3.0GPL-3.0

CrudApplication

A basic crud application example

Master

Build Status codecov.io Codacy Badge

Develop

Build Status codecov.io

Installation

  1. Create the necessary database table on your favourite RDBMS (see script.sql)
  2. Download and change JDBC URL, username and password in org.systemexception.crudapplication.dao.EmployeeDaoImpl
  3. Compile and deploy to you favourite web container

Dependencies

READ CAREFULLY

Testing

Use glassfish-embedded-all and comment out javaee-web-api.

Production

Use javaee-web-api and comment out glassfish-embedded-all.

Usage

Available servlets:

  • BadWorld: just generates a bunch of random hex codes
  • HelloWorld: pretty explicative
  • InsertEmployee: create an employee
  • RandomEmployee: reads a random employee
  • ListEmployees: reads a table with all employees in the database
  • EmployeesJson: reads the full employee list in a JSON
  • UpdateEmployee: update employee record
  • DeleteEmployee: delete an employee