Я использую инструменты гибернации с ant.build.xml ниже.это кодировка выходного файла gbk, я хочу установить кодировку utf-8?спасибо.
<?xml version="1.0" encoding="UTF-8"?>
<project name="hibernate tools" default="generate.code" xmlns:artifact="antlib:org.apache.maven.artifact.ant">
<property name="test" value="target/gen/" />
<property name="src.dir" value="${test}src/main/" />
<property name="hibernatetools-templates.path" value="src/main/resources/templates" />
<artifact:dependencies pathId="toolslib">
<pom file="pom.xml" />
</artifact:dependencies>
<taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask" classpathref="toolslib" />
<target name="generate.code">
<hibernatetool destdir="${src.dir}" templatepath="${hibernatetools-templates.path}/">
<classpath>
<path location="src/main/resources/" />
</classpath>
<property propertyFile="src/main/resources/freemarker.properties"/>
<jdbcconfiguration configurationfile="src/main/resources/hibernate.cfg.xml" revengfile="src/main/resources/hibernate.reveng.xml" detectmanytomany="true" namingstrategy="org.hibernate.cfg.ImprovedNamingStrategy" reversestrategy="org.hibernate.cfg.reveng.DelegatingReverseEngineeringStrategy" />
<hbmtemplate templateprefix="pojo/" template="pojo/Pojo.ftl" filepattern="java/{package-name}/{class-name}.java">
<property key="jdk5" value="true" />
<property key="ejb3" value="true" />
</hbmtemplate>
</hibernatetool>
</target>
</project>