Invalid property 'annotatedClasses' of bean class
来源:互联网 发布:sql convert 编辑:程序博客网 时间:2024/06/03 08:45
Invalid property 'annotatedClasses' of bean class
在整合Hibernate和Spring时出现,Invalid property 'annotatedClasses' of bean class
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="dataSource" ref="myDataSource"></property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.SQLServerDialect
</prop>
</props>
</property>
<property name="annotatedClasses">
<list>
<value>org.yinpan.hibernate.GuestBook</value>
</list>
</property>
</bean>
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="myDataSource"></property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.SQLServerDialect
</prop>
</props>
</property>
<property name="mappingResources">
<list>
<value>org/yinpan/hibernate/GuestBook.hbm.xml</value>
</list>
</property>
</bean>
上面只需要注意红色部分就行了,注解实体与XML方式引用的类是不一样的。
引自:http://www.blogjava.net/yinpan/archive/2011/07/07/353845.html
在整合Hibernate和Spring时出现,Invalid property 'annotatedClasses' of bean class
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="dataSource" ref="myDataSource"></property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.SQLServerDialect
</prop>
</props>
</property>
<property name="annotatedClasses">
<list>
<value>org.yinpan.hibernate.GuestBook</value>
</list>
</property>
</bean>
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="myDataSource"></property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.SQLServerDialect
</prop>
</props>
</property>
<property name="mappingResources">
<list>
<value>org/yinpan/hibernate/GuestBook.hbm.xml</value>
</list>
</property>
</bean>
上面只需要注意红色部分就行了,注解实体与XML方式引用的类是不一样的。
引自:http://www.blogjava.net/yinpan/archive/2011/07/07/353845.html
- Invalid property 'annotatedClasses' of bean class
- Invalid property 'annotatedClasses' of bean class
- Invalid property 'annotatedClasses' of bean class
- Invalid property 'name' of bean class
- Invalid property 'driver_class' of bean class
- Invalid property 'initialSize' of bean class 问题解决
- Invalid property 'LyMhXnyjjsrDaoImpl' of bean class
- Invalid property 'transactionManager' of bean class的解决办法
- org.springframework.beans.NotWritablePropertyException: Invalid property 'dDuMapDao' of bean class
- NotReadablePropertyException: Invalid property 'principal.userName' of bean class [org.springframewo
- Invalid property 'transactionManager' of bean class的解决办法
- Invalid property 'maxActive' of bean class [redis.clients.jedis.JedisPoolConfig]
- org.springframework.beans.NotWritablePropertyException: Invalid property 'userDao' of bean class
- Invalid property 'maxActive' of bean class [redis.clients.jedis.JedisPoolConfig]
- 四、Invalid property 'dataSource' of bean class [xxx.dao.JdbcUserDao]: Bean property
- Invalid property 'maxActive' of bean class [redis.clients.jedis.JedisPoolConfig]: Bean property
- Invalid property 'maxActive' of bean class [redis.clients.jedis.JedisPoolConfig]: Bean property
- Bean property 'annotatedClasses' is not writable or has an invalid setter method
- js获取当前浏览器版本
- linux tools
- aix 使用g++编译c++程序的编译选项 -- linux到aix移植经验
- ASP.NET 页面通过url传递参数,另一页面通过Request.QueryString获取参数为乱码问题
- android 下 移植 wifi的不错的文章
- Invalid property 'annotatedClasses' of bean class
- 2012年百度实习生笔试题
- 常用正则表达式大全
- Java管道流PipeInputStream与PipeOutputStream
- Windows命令行获取当前bat文件所在目录,添加永久系统环境变量的方法
- 判断字符串是否是中文
- 排序算法(一)
- Fusion处理器
- STMFD和LDMFD指令个人理解分析