elbaza1 / o.wafi-y.elbaza

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"# o.wafi-y.elbaza"

A Maven project containing

  • JPA
  • Hibernate
  • Restful Webservice using JAX-RS

Intellij IDEA


How to ?

Before running this project, you must install dependencies for sure using pom.xml , then after it, start by creating a Mysql Database, called sir, or you can configure it on persitence.xml.
Once finished run the jpaTest.java for the java part. Otherwise for the Rest/Servlet part, run tomcat7, you can do that by using maven console and running goal


For the Rest Part

You can try theese ones as an example for getting data :

List all Homes :

List one home by providing an ID in the url like :

List all People :

List one person by providing an ID in the url like :

To post data to the webservice, you can use the chrome Extension : Avanced Rest Client extension. Post data to

the request body must contains an object of course, for example to save a person : the request body contains something like :

{
"nom": "xxx",
"prenom": "x1x1x1",
"mail": "x1xxx1@gmail.com"
}
and the body content type would be application/json.

About


Languages

Language:Java 95.3%Language:HTML 4.7%