An open API service indexing awesome lists of open source software.

https://github.com/soujava/mvc-cxf-tomee

A sample repository code that has the MVC spec with MongoDB using TomEE
https://github.com/soujava/mvc-cxf-tomee

Last synced: 3 months ago
JSON representation

A sample repository code that has the MVC spec with MongoDB using TomEE

Awesome Lists containing this project

README

        

= MVC-CXF
:index-group: Misc
:jbake-type: page
:jbake-status: published

Simple example of using link:http://mvc-spec.org[http://mvc-spec.org] together with Eclipse JNoSQL to do CRUD operations.

=== Steps to run the example

==== Run MongoDB Using Docker

image::https://www.docker.com/sites/default/files/horizontal_large.png[Docker,align="center"]

1. Install docker: https://www.docker.com/
1. https://store.docker.com/images/mongo
1. Run docker command
1. Run MongoDB: verify MongoDB image name with the command `docker images`, it can be mongodb or mongo, and then execute this command
1. `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` or change `JAVA_OPTS: "-Ddocument.settings.jakarta.nosql.host=mongodb:27017"` in docker-compose

- 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

https://projects.eclipse.org/proposals/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.