上一页 1 ··· 11 12 13 14 15
摘要: 使用Hibernate的NativeSQL写了一个查询语句,但是后台报了SQL语法错误,具体报错如下:[2012-08-08 12:55:00] ERROR -> ORA-00918: column ambiguously defined[2012-08-08 12:55:00] ERROR -> org.hibernate.exception.SQLGrammarException: could not execute query原因一:如果2张表包含相同的字段,则对着同一个字段的操作如果不加上表名就会报此异常,如:Student表:idname1student12student 阅读全文
posted @ 2012-08-08 13:11 心意合一 阅读(451) 评论(0) 推荐(0) 编辑
摘要: 非spring托管对象要获取到spring托管对象,主要是对ApplicationContext的获取总共可以分为以下四种方式获取ApplicationContext:一,通过spring配置文件applicationContext.xml初始化import org.springframework.context.ApplicationContext;import org.springframework.context.support.FileSystemXmlApplicationContext;public class SpringUtil{ private static Applicat 阅读全文
posted @ 2012-08-08 10:22 心意合一 阅读(362) 评论(0) 推荐(0) 编辑
上一页 1 ··· 11 12 13 14 15