Skip to content
A sample repository code that has the MVC spec with MongoDB using TomEE
Java Shell Dockerfile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/main
.gitignore
Dockerfile
LICENSE
README.adoc
docker-compose.yml
pom.xml
run.sh

README.adoc

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

Docker
  1. Install docker: https://www.docker.com/

  2. https://store.docker.com/images/mongo

  3. Run docker command

  4. Run MongoDB: verify MongoDB image name with the command docker images, it can be mongodb or mongo, and then execute this command

  5. 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 to mongodb

  • if necessary change in docker-compose the volumes: - ./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.

You can’t perform that action at this time.