Hibernate middlegen中mssql.xml配置

2008-02-23 10:10:47来源:互联网 阅读 ()

新老客户大回馈,云服务器低至5折

1,将JDBC,lib中3个jar包copy到应用的lib目录下,然后进行配置。
2,MSSQL.XML如下

<!-- ant properties/targets for MS SQL Server -->
<!-- note: this is not a proper xml file (there is no root element) -->
<!-- it is intended to be imported from a *real* xml file -->
<property name="database.script.file" value=""/>
<property name="database.driver.file" value="${lib.dir}/mssqlserver.jar" />
<property name="database.driver" value="com.microsoft.jdbc.sqlserver.SQLServerDriver"/>
<property name="database.url" value="jdbc:microsoft:sqlserver://localhost:1433;database=dada"/>
<property name="database.userid" value="sa"/>
<property name="database.password" value="sa"/>
<!-- In MS SQL the schema is the owner of the tables as displayed by SQL Server EntERPrise Manager -->
<property name="database.schema" value="dbo"/>
<!-- In MS SQL the catalog is the database, for example, 'Northwind' -->
<property name="database.catalog" value="dada"/>

<property name="jboss.datasource.mapping" value="MS SQLSERVER"/>
<!--property name="jboss.datasource.mapping" value="MS SQLSERVER2000"/-->
3,build.xml中
<middlegen
appname="${name}"
prefsdir="${src.dir}"
gui="${gui}"
databaseurl="${database.url}"
initialContextFactory="${Java.naming.factory.initial}"
providerURL="${java.naming.provider.url}"
datasourceJNDIName="${datasource.jndi.name}"
driver="${database.driver}"
username="${database.userid}"
password="${database.password}"
schema="dbo" //不是删除
catalog="dada"
includeViews="false"
>

上一篇: Java 中文问题的解决 mysql, oracle, servlet, jsp
下一篇: 解决Tomcat 编码问题的Character Encoding 另类过滤器实现.

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:学习Java的30个基本概念

下一篇:CruiseControl简介