Spring配置文件加载时出现Bean property ‘*’ is not writable or has an invalid setter method当某个Action 注入Bean时,出现NotWritablePropertyException异常,检查你代码没有错误的情况下,就要看你的[......]
分类目录归档:Java程序开发
hibernate+freemarker主外键关联表的非级联更新
hibernate+freemarker主外键关联表的非级联更新。hiabernate中的cascade =”all”级联更新从表的时候,会使程序的功能实现起来很容易。但如果想删掉主表的记录而从表的记录保留时,则应该cascade =”save-update”或者cascade =”none”(默认[......]
Provider com.bea.xml.stream.MXParserFactory not found
Provider com.bea.xml.stream.MXParserFactory not found 。Provider com.bea.xml.stream.MXParserFactory not found
javax.xml.stream.FactoryConfiguratio[......]
Struts2中Action中的表单实体对象为null
Struts2中Action中的表单实体对象为null 。今天遇到这样一个问题,在表单提交数据的时候,action中接收到的表单对象总是为null,程序代码跟其他页面都是一样的,不知道为什么这个页面就是不行,查看了spring的applicationContext.xml配置,此action已经在里[......]
com.microsoft.sqlserver.jdbc.SQLServerException: 该语句没有返回结果集
com.microsoft.sqlserver.jdbc.SQLServerException: 该语句没有返回结果集。数据库由sqlserver2000迁移到sqlserver2008的时候,当查询执行存储过程时,总会抛出以上异常,后来查资料发现原来2008的驱动会关注到存储过程执行过程中返回的“[......]
Spring2+Hibernate3+Struts2整合文档
Spring2+Hibernate3+Struts2整合文档。Spring的官方定义是:一个轻量级的IoC和Aop容器框架,它使用了一种叫做依赖注入的技术。
所谓依赖注入,就是指将创建对象以及协议依赖对象之间合作的责任从对象自身中转移到“工厂”中去,这个“工厂”通常由IoC容器提供。[......]
hibernate继承映射JOINED
hibernate继承映射JOINED 。
如下关系:
父类:Person,子类:Student和Teacher,Student从Person继承,Teacher从Person继承
————————————————[......]
SchemaExport生成表
SchemaExport生成表@Test//帮助生成表的,显示建表语句
public void testSchemaExport() {
new SchemaExport(new AnnotationConfiguration().configure()).create(false, tr[......]
HQL查询
hibernate常用注解
hibernate常用注解。
1.show_sql和format_sql
在hibernate.cfg.xml配置文件中添加如下的配置:
<property name=”format_sq”>true</property>,将sql语句格式化一下
2.[......]