Archetype starter project to create RESTful WS using Java, Jersey WS, Spring, Hibernate, Maven, Liquibase. Sample code for integrating with Hibernate/MySQL and MongoDB/NoSQL.
Note:This is a skeletal archetype framework. Using the sample code, developers can send a sample CURL call (see section "Sample test CURL calls" below) to the running web service and see the changes propagated all the way to the databases. There are, currently, two webservice end points, /user and /purchase for demonstrating MySQL and MongoDB respectively. Developers will have to write the actual functionality to make use of the framework.
New:Support for MongoDB
Coming Up:Support for Cassandra
Coming Up:Support for NuoDB
Developers:
Parth Parekh - parthparekh at gmail dot com
Swapnil Dipankar - dswapnil at gmail dot com
Technologies used in the project
Java
Jersey WS Framework
Spring Framework
Hibernate
Maven
Liquibase
MySQL
Mongo DB
Prerequisite packages
Note:The project has been tested on several versions of Mac OSX and Ubuntu Linux, but can work on any other platform as long as the packages mentioned in this section are available on the platform. Ensure that the user has sudo access to the host
OpenJDK SDK (run command sudo apt-get install openjdk-6-jdk, if not present) Note:Sun JDK can be used instead of OpenJDK without impacting the functionality of the framework
Git (run command sudo apt-get install git or sudo apt-get install git-core, if not present)
Maven (run command sudo apt-get install maven2, if not present)
Curl (run command sudo apt-get install curl, if not present)
MySQL Server (run command sudo apt-get install mysql-server, if not present)
MongoDB (run command sudo apt-get install mongodb, if not present)
Vim (optional) (run command sudo apt-get install vim, if not present)
Ensure that MySQL is running and has the root password as password (Else, modify the hibernate.cfg.xml file with correct database credentials)
Ensure that database test exists (Else, create a database test with the access credentials specified in hibernate.cfg.xml file)
Prerequisite MongoDB database
Ensure that MongoDB is running (run command mongod --master --dbpath path_to_directory_that_will_contain_database_data)
Ensure that database purchase has user with credentials (purchase_user, purchase4user) (Else, modify the credentials in file resources/mongodb/mongo-config.json)
请发表评论