我正在使用 HQL 查询,请参阅下面的代码。
实体类:
@Entity
@Table(name = "COUNTRY")
public class Country implements Serializable{
private long countryCode;
private String countryName;
道:
public List<Country> getCountryList(){
List<Country> resultList = null;
System.out.println("in dao");
Query query = getSession().createQuery(" from country ctry ");
resultList = query.list();
return resultList;
}
应用上下文.xml:
<beans:property name="annotatedClasses">
<beans:list>
<beans:value>com.test.in.ergy.entity.Country</beans:value>
</beans:list>
</beans:property>
可能是什么问题