vincent_shiu
   
發文: 64
積分: 0
|
於 2007-04-03 16:31
      
如果我有一個DAO類別如下:
1 2 3 4
| public interface ParameterDAO<P extends Parameter> extends GenericDAO<P,Long>
{
.....
}
|
在Spring的設定檔.
1
| <bean id="paramDAO" class="proj.dao.hibernate.ParameterHibernateDAO"/>
|
但在啟動時會出現..
1
| org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [proj.dao.hibernate.ParameterHibernateDAO]: Constructor threw exception; nested exception is java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.TypeVariableImpl
|
想請教一下, Spring裡能設定generics的類別嗎? 如果可以, 要如何設定?
謝謝...
 
假行僧
|