I am developing RESTEasy Example. In this example I am using all latest dependencies and deploying om tomcat 8.x version. I can successfully deploy the applicat
To be more clear, for beginners. add the
@XmlRootElement(name = "yourClassLowerCased")
at the beginning of your class, like
package org.dlss.entities;
import javax.persistence.*;
import javax.xml.bind.annotation.XmlRootElement;
@Entity //The class will be a javax.persistence Entity (could be stored in a DB)
@Table(name = "person", schema = "public", catalog = "") //Table name
@XmlRootElement(name = "person")
public class PersonEntity {
@Id //Following field will be the id of the table
@GeneratedValue(strategy = GenerationType.IDENTITY) //Will be autoincremented when generated for type SERIAL into postgresql
private Integer id;