用SpringMVC中在src/main/resources
我有我的hibernate.cfg.xml
休眠用SpringMVC「MappingNotFoundException」
我有一個類,是我的模型src/main/java
org.david.model.UserDetails.java
如下粘貼。
@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;
}
}
每當我跑我的項目,它擊中創建我得到一個
org.hibernate.MappingNotFoundException會議代碼:資源:找不到org.david.model.UserDetails
映射到該文件是在我的hibernate.cfg.xml
線...
<mapping resource="org.david.model.UserDetails"/>
我錯過了什麼嗎?