MVC-CXF
Simple example of using http://mvc-spec.org together with Eclipse JNoSQL to do CRUD operations.
Steps to run the example
Run MongoDB Using Docker
-
Install docker: https://www.docker.com/
-
Run docker command
-
Run MongoDB: verify MongoDB image name with the command
docker images
, it can be mongodb or mongo, and then execute this command -
docker run -d --name mongodb-instance -p 27017:27017 mongo
Run Application
Build and start the demo:
`mvn clean install tomee:run`
Open:
`http://localhost:8080/mvc-cxf`
Run Application with Docker-Compose
Build and start the demo:
./run.sh
OBS:
-
Install Docker & Docker-Compose
-
edit run.sh with the your path of JDK and Maven
-
edit nosql.json for change the
localhost
tomongodb
or changeJAVA_OPTS: "-Ddocument.settings.jakarta.nosql.host=mongodb:27017"
in docker-compose -
if necessary change in
docker-compose
thevolumes: - ./data/db:/data/db
for your other location.
Open:
http://localhost:8080/mvc-cxf
Intro of Eclipse Krazo
Eclipse-Krazo is an implementation of action-based MVC specifiec by MVC 1.0 (JSR-371).
It builds on top of JAX-RS and currently contains support for RESTEasy, Jersey and CXF with a well-defined SPI for other implementations.