0
我想在屬性級別執行延遲加載。我爲Hibernate 4.3.11版本的模型類做了字節碼檢測。它工作正常,沒有任何問題。但是,當我升級我的罐子到5.1.0相同的字節碼儀器不工作。休眠字節代碼工具不適用於5.1.0版本
我google了,但沒有運氣的相同。請讓我知道是否有人有任何想法。
我的pom.xml這是工作了4.3.11版本
<插件>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>hib-bytecode-optimize</id>
<phase>process-classes</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<taskdef name="instrument" classname="org.hibernate.tool.instrument.javassist.InstrumentTask">
<classpath>
<path refid="maven.dependency.classpath" />
<path refid="maven.plugin.classpath" />
</classpath>
</taskdef>
<instrument>
<fileset dir="${basedir}/build/classes/xxx/yyy/">
<include name="*.class" />
</fileset>
</instrument>
<echo>*** Hibernate bytecode optimization *** ${basedir}</echo>
</tasks>
</configuration>
</execution>
</executions>
</plugin>