Hibernate学习笔记

强机制

新建build.xml

<?xml version="1.0" encoding="UTF-8"?>

<project name="hibernatelazy" default="instrument" basedir=".">

      <property name="lib.dir" value="./lib"/>

      <property name="classes.dir" value="./classes"/>

 

      <path id="lib.class.path">

            <fileset dir="${lib.dir}">

                   <include name="**/*.jar"/>

             </fileset>

       </path>

       <target name="instrument">

           <taskdef name="instrument" 

classname="org.hibernate.tool.instrument.InstrumentTask">

                    <classpath path="${classes.dir}"/>

                    <classpath refid="lib.class.path"/>

            </taskdef>

            <instrument verbose="true">

                     <fileset dir="${classes.dir}/com/derek/known/hbm">

                           <include name="Knownquestions.class"/>

                     </fileset>

             </instrument>

        </target>

</project>

注意:
<property name="lib.dir" value="./lib"/>所需的JAR文件路径
<property name="classes.dir" value="./classes"/>编译输出路径


你可能感兴趣的:(Hibernate,curd)