锘??xml version="1.0" encoding="utf-8" standalone="yes"?>欧美日韩亚洲一区二区,国产一区二区视频在线,久久久久久久久综合 http://www.aygfsteel.com/knowhow/archive/2007/08/27/55774.html#140092鍝堝搱 鍝堝搱 Mon, 27 Aug 2007 10:56:00 GMT http://www.aygfsteel.com/knowhow/archive/2007/08/27/55774.html#140092
涓轟粈涔堣佹槸鎶ヨ繖涓敊璇?img src ="http://www.aygfsteel.com/knowhow/aggbug/140092.html" width = "1" height = "1" /> ]]> re: Hibernate澶嶅悎涓婚敭鐨勫鐞?涓) http://www.aygfsteel.com/knowhow/archive/2006/10/22/55784.html#76664hibernate鍒濆鑰?/dc:creator>hibernate鍒濆鑰?/author>Sun, 22 Oct 2006 13:51:00 GMT http://www.aygfsteel.com/knowhow/archive/2006/10/22/55784.html#76664 鎴戠殑浠g爜濡備笅:
User.java
...
User.hbm.xml
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping
PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="onlyfun.caterpillar.user" table="user" catalog="sample">
<composite-id>
<key-property name="name"
column="name"
type="java.lang.String"/>
<key-property name="phone"
column="phone"
type="java.lang.String"/>
</composite-id>
<property name="age" column="age" type="java.lang.Integer"/>
</class>
</hibernate-mapping>
HibernateTest.java
...
build.xml:
<project name="JNameIt" default="all">
<target name="setProperties" description="setup the common properties">
<property name="src.dir" value="src"/>
<property name="images.dir" value="images"/>
<property name="classes.dir" value="classes"/>
<property name="lib.dir" value="lib"/>
</target>
<path id="1">
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
</path>
<path id="class.path">
<!-- Include our own classes, of course -->
<pathelement location="${classes.dir}" />
<!-- Include jars in the project library directory -->
<fileset dir="lib">
<include name="*.jar"/>
</fileset>
<pathelement path ="${classpath}"/>
</path>
<taskdef name="schemaexport"
classname="org.hibernate.tool.hbm2ddl.SchemaExportTask"
classpathref="class.path"/>
<schemaexport
properties="classes/hibernate.properties"
quiet="no"
text="no"
drop="no"
delimiter=";"
output="/schema-export.sql">
<fileset dir="images">
<include name="*.hbm.xml"/>
</fileset>
</schemaexport>
<target name="clean" depends="setProperties" description="clean up the previous built files or dirs">
<delete dir="${classes.dir}"/>
<delete file="${jar.file}"/>
</target>
<target name="prepareDir" depends="setProperties" description="prepare necessary dirs">
<mkdir dir="${classes.dir}"/>
<mkdir dir="${lib.dir}"/>
<!--
<copy todir="${classes.dir}/images">
<fileset dir="${images.dir}"/>
</copy>
-->
</target>
<target name="compile" depends="prepareDir" description="compile the source files">
<javac srcdir="./src" destdir="${classes.dir}"
classpathref="1"/>
<copy todir="${classes.dir}/onlyfun/caterpillar">
<fileset dir="${images.dir}"/>
</copy>
</target>
<target name="run" depends="compile">
<java fork="true" classname="onlyfun.caterpillar.HibernateTest" classpathref="1">
<classpath path="${classes.dir}"/>
</java>
</target>
<target name="all" depends="clean" description="perform all targets"/>
</project>
User.java,hibernate.java鏀懼湪WEB-INF/SRC 涓?User.hbm.xml鏀懼湪WEB-INF/images涓?build.xml鏀懼湪WEB-INF,
紼嬪簭緇撴瀯鍜屼綘鍩烘湰涓鏍?涓轟粈涔堢敤ant run 鏃跺嚭鐜?
D:\Apache Software Foundation\Tomcat 5.5\webapps\HibernateTest\WEB-INF\build.xml
:35: Schema text failed: component class not found: onlyfun.caterpillar.User鐨勯敊璇?濂介暱鏃墮棿閮芥病瑙e喅,緗戜笂涔熸壘涓嶅埌綾諱技鐨勯敊璇?
璋㈣阿浣犲府蹇欑湅涓涓? ]]> re: Hibernate鏄犲皠鑷畾涔夋暟鎹被鍨?/title> http://www.aygfsteel.com/knowhow/archive/2006/08/14/55774.html#63486kocr kocr Mon, 14 Aug 2006 07:16:00 GMT http://www.aygfsteel.com/knowhow/archive/2006/08/14/55774.html#63486 ]]> re: Hibernate澶嶅悎涓婚敭鐨勫鐞?(浜? http://www.aygfsteel.com/knowhow/archive/2006/08/02/55828.html#61370dt1 dt1 Wed, 02 Aug 2006 10:08:00 GMT http://www.aygfsteel.com/knowhow/archive/2006/08/02/55828.html#61370 ]]>
主站蜘蛛池模板:
靖边县 |
垦利县 |
从化市 |
阜城县 |
吴江市 |
台湾省 |
安吉县 |
龙山县 |
手游 |
澎湖县 |
太康县 |
夏津县 |
防城港市 |
齐河县 |
元朗区 |
东至县 |
蒙阴县 |
利辛县 |
松江区 |
正镶白旗 |
山东 |
双柏县 |
麻栗坡县 |
嘉黎县 |
丹阳市 |
承德市 |
九寨沟县 |
梧州市 |
平和县 |
天柱县 |
井冈山市 |
屏东县 |
益阳市 |
隆林 |
灵宝市 |
忻城县 |
西安市 |
伊吾县 |
大城县 |
育儿 |
任丘市 |