Skip to content
This repository has been archived by the owner on Feb 9, 2022. It is now read-only.

marco76/java-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[Archived] This project was used as showroom for some new features of Java EE 8 (BeanValidation, CDI and WebSockets in particular) using Angular (v. 2) as frontend.

The frameworks changed with the time and the project has been archived.

Java EE 8 + Spring Demo with Angular

The scope of the application is to show some new features of the latest version of Java EE and Spring. Angular is used as frontend UI and communicates with the server. This architecture is one of the most common in the professional environments: Java EE <--> REST Services <--> Angular (JS Framework) Spring <--> REST Services <--> Angular

Features

  • Java EE 8 features
    • Bean Validation 2.0 (alpha)
    • CDI 2.0 (alpha)
    • JSONB
  • Java EE 7 features
    • WebSockets

How to install

Prerequisites

Production mode

  • clone the git project from the root of the project launch mvn package this generates a package named ROOT.war in the PROJECT/server/target directory you can deploy this package in your favourite application server. The Angular application should answer at the requests to http://localhost:8080 Development mode

Development mode

  • clone the git project You can start the server using your favourite IDE. The project uses a standard Maven directory structure. You need to configure the server to deploy the server.war artifact. from the PROJECT/client/src directory install the npm packages : npm install launch the client with ng serve. The client uses the port 4200 (default for Angular CLI) and you can navigate to http://localhost:4200

Docker image

You can find the docker image here : https://hub.docker.com/r/javaee/java-demo/

The docker image install a linux distribution, download the sources and the required libraries and application server (custom edition). It compiles the sources codes and deploy the application on the port 80.

You can run it with this instruction: docker run --rm -it -p 80:80 javaee/java-demo

How the code is organized

The code structure has been adapted to easily found the ressources of the demo and doesn't follow the best practices for an enterprise project.

The package io.javademo.common.web contains common classes for the infrastructure of the project.

The package io.javademo.examples contains the specific code used for each example. The code is grouped by feature (beans, DTO, resources, services together) and not on technical layers.

UPDATES

17.04.2017: CDI demo, refactoring server and client

About

[Archived ]Java EE 8 Demo collection

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published