[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.
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
- Java EE 8 features
-
- Bean Validation 2.0 (alpha)
-
- CDI 2.0 (alpha)
-
- JSONB
- Java EE 7 features
-
- WebSockets
Prerequisites
- you need maven, npm, git and an application server Java EE
- the demo uses some Java 8 features that are still in developement. At the moment it works only with WildFly patched with the following instructions: http://in.relation.to/2017/04/04/testing-bean-validation-2-0-on-wildfly-10/ and http://weld.cdi-spec.org/news/2017/03/03/weld-300CR2/ We will adapt to Glassfish (RI) when it will support BV 2.0.
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
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