文章分类 - j2ee
knowledge of j2ee.
摘要:贴出错误提示代码【节选】:Context initialization failedorg.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 9 in XML document from ServletContext resource [/WEB-INF/applicationContext.xml] is invalid;nested exception is org.xml.sax.SAXParseException: The reference to entity "character
阅读全文
摘要:1 <?xml version='1.0' encoding='UTF-8'?> 2 <!DOCTYPE hibernate-configuration PUBLIC 3 "-//Hibernate/Hibernate Configuration DTD 3.0//EN" 4 "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> 5 6 <!-- Generated by MyEclipse Hibernate
阅读全文
摘要:1、自动增长identity适用于MySQL、DB2、MS SQL Server,采用数据库生成的主键,用于为long、short、int类型生成唯一标识使用SQL Server 和 MySQL 的自增字段,这个方法不能放到 Oracle 中,Oracle 不支持自增字段,要设定sequence(MySQL 和 SQL Server 中很常用)数据库中的语法如下:MySQL:create table t_user(id int auto_increment primary key, name varchar(20));SQL Server:create table t_user(id int
阅读全文
摘要:在开发hibernate的程序时,需要进行SessionFactory的配置,简单地说,也就是建立与数据库之间连接的配置,在hibernate中一般使用xml文件来进行配置,但是在该文件的配置中需要设置dialect方言属性值,对于不同的数据库,方言的值dialect是不同的,那么下面就列出在不同的数据库中如何设置该dialect值(参见下表):RDBMS方言DB2org.hibernate.dialect.DB2DialectDB2 AS/400org.hibernate.dialect.DB2400DialectDB2 OS390org.hibernate.dialect.DB2390D.
阅读全文

浙公网安备 33010602011771号