【发布时间】:2019-09-05 12:39:18
【问题描述】:
我需要使用 Hibernate 延迟加载实体属性(图像文件)。但是我不了解它所需的配置。
根据https://docs.jboss.org/hibernate/orm/4.3/manual/en-US/html_single/#performance-fetching-lazyproperties,我需要设置字节码检测以延迟加载属性。
<taskdef name="instrument" classname="org.hibernate.tool.instrument.InstrumentTask">
<classpath path="${jar.path}"/>
<classpath path="${classes.dir}"/>
<classpath refxml:id="lib.class.path"/>
</taskdef>
<instrument verbose="true">
<fileset dir="${testclasses.dir}/org/hibernate/auction/model">
<include name="*.class"/>
</fileset>
</instrument>
</target>
我不明白必须为“lib.class.path”和“${testclasses.dir}”指定什么路径。
【问题讨论】: