FoxRESTful is a RESful service based on Jersey RESTful Web Service.
- Employees: /foxrestful/rest/employees
- Departments: /foxrestful/rest/departments
- GET: get entity or group of entities
- POST: create new entity
- PUT: update avaliable entity
- DELETE: delete avaliable entity
For more details read index.html
- Jersey RESTful server (1.19)
- Hibernate (4.3.8.Final)
- MySQL
- Tomcat 7, 8 (or another container)
- Maven
The following steps apply only for Tomchat container:
-
Clone repository to your machine.
-
Create user (for example: user="deployer", password="s3cr3t") for Tomcat in file %TOMCAT_HOME%\conf\tomcat-users.xml with roles "manager-gui,manager-script"
-
In settings.xml for your Maven (you can find this file in %MAVEN_DIR%\conf\settings.xml or %PATH_TO_USER_DOCS%\.m2\settings.xml) create new server in section "servers" with your login/password pair: MyTomcat deployer s3cr3t
-
If you change id section in previous step you must change server for Tomcat Maven Plugin in pom.xml of this project (configuration for tomcat maven plugin).
-
If your Tomcat servlet container has a non-standard 8080 port you must change it in pom.xml (configuration for tomcat maven plugin).
-
Create on MySQL Server DB: foxrest_db (or you can change this in hibernate.cfg.xml)
-
Create user="lekarto" and password="1" (or you can change this in hibernate.cfg.xml).
-
Give the full right for new user to DB from step 6.
-
Start Tomcat servlet container.
-
Open project directory in console.
-
Execute:
mvn tomcat7:deploy -
Open in your browser
-
http://localhost:8080/foxrestful/rest/employees for get all employees
-
http://localhost:8080/foxrestful for reading FoxRESTful specification
That's all.
MIT