分享

Spring Roo 的中文支持

 richsky 2013-10-29
Spring Roo 目前还不直接支持UTF8,只支持西欧字体,只好还是用native2ascii转,方法跟就是用maven的plugin了:

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
  <execution>
   <id>compile</id>
   <phase>compile</phase>
   <configuration>
    <tasks>
     <native2ascii
       encoding="UTF-8"
       src="src/main/webapp/WEB-INF/i18n"
       dest="target/${name}-${version}/WEB-INF/i18n"
       includes="*_zh.properties"/>
    </tasks>
   </configuration>
   <goals>
    <goal>run</goal>
   </goals>
  </execution>
</executions>
<dependencies>
  <dependency>
   <groupId>ant</groupId>
   <artifactId>ant-nodeps</artifactId>
   <version>1.6.5</version>
  </dependency>
  <dependency>
   <groupId>com.sun</groupId>
   <artifactId>tools</artifactId>
   <version>1.5.0</version>
   <scope>system</scope>
   <systemPath>${java.home}/../lib/tools.jar</systemPath>
  </dependency>
</dependencies>
</plugin> 

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多