In SpringMVC in src/main/resources I have my hibernate.cfg.xml
I have a class that's my model in src/main/java org.david.model.UserDetails.java as pasted below.
@Entity
public class UserDetails {
@Id
private int userId;
private String username;
private String password;
public int getUserId() {
return userId;
}
public void setUserId(int userId) {
this.userId = userId;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
}
Whenever I run my project and it hits the code that creates the session I get a
org.hibernate.MappingNotFoundException: resource: org.david.model.UserDetails not found
The line in my hibernate.cfg.xml that maps to the file is...
<mapping resource="org.david.model.UserDetails"/>
Am I missing something?