Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

@Entity entity cannot be resolved to a type

Learning Spring MVC and Hibernate.

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

@Entity
public class Customer {

In @Entity line there is an error : entity cannot be resolved to a type

I got jars from spring-framework-2.5.6 Can you please tell me what I am missing here ?

like image 238
Majid Kamal Avatar asked Dec 10 '22 01:12

Majid Kamal


1 Answers

You are missing an import statement:

import javax.persistence.Entity;
like image 77
Bozho Avatar answered Dec 11 '22 15:12

Bozho