下面代码里show_sql那行,我加上了,就提示如下错误:
Multiple annotations found at this line:
- No setter found for property 'show_sql' in class
'org.springframework.orm.hibernate3.LocalSessionFactoryBean'
- cvc-complex-type.2.3: Element 'property' cannot have character [children], because the
type's content type is element-only.
- <property> element for property 'show_sql' must specify a ref or value
不加那行代码就没事,这怎么改啊,总报错 <bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource" />
</property>
<property name="show_sql">true</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.MySQLDialect
</prop>
</props>
</property>
<property name="mappingResources">
<list>
<value>com/zjm/study/vo/Codedb.hbm.xml</value>
<value>com/zjm/study/vo/Userdb.hbm.xml</value>
</list>
</property>
</bean>
Multiple annotations found at this line:
- No setter found for property 'show_sql' in class
'org.springframework.orm.hibernate3.LocalSessionFactoryBean'
- cvc-complex-type.2.3: Element 'property' cannot have character [children], because the
type's content type is element-only.
- <property> element for property 'show_sql' must specify a ref or value
不加那行代码就没事,这怎么改啊,总报错 <bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource" />
</property>
<property name="show_sql">true</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.MySQLDialect
</prop>
</props>
</property>
<property name="mappingResources">
<list>
<value>com/zjm/study/vo/Codedb.hbm.xml</value>
<value>com/zjm/study/vo/Userdb.hbm.xml</value>
</list>
</property>
</bean>
解决方案 »
- lucene3.0.2 海量数据报错(1千万条)
- runtime.exec调用psexec远程执行命令
- struts2+Hibernate3.0+Spring2.5+Ajax(Jquery)问题
- 对java的正则对象不太熟悉,求一个用正则获取子匹配的hello world 程序
- 关于Jboss的BEAN热配置的问题 急急急!!!
- 综合物流管理系统源码+开发文档(j2ee+oracle)
- Message message[] = folder.getMessages();会花很长时间下载邮件么?
- 用java写一个发送email的程序,在发送email的时候, 不加发送者的地址,有没有办法?
- EJB实体Bean问题,WebSphere + Ms SqlServer
- Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
- 如何让外网的用户能够访问到我的TOMCAT服务器网站?
- spring切入点的问题
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.MySQLDialect
</prop>
<prop key="hibernate.show_sql">true</prop>
</props>
</property>
<property name="dataSource" ref="dataSource"></property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
<prop key="hibernate.show_sql">true</prop>
</props>
</property>
<property name="mappingResources">
<list>
<value>com/test/bean/User.hbm.xml</value>
</list>
</property>
</bean>