﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>语源科技BlogJava-不同樊响</title><link>http://www.blogjava.net/heyday/</link><description>请访问主站：http://heyday.blogcn.com</description><language>zh-cn</language><lastBuildDate>Fri, 17 Apr 2026 22:39:30 GMT</lastBuildDate><pubDate>Fri, 17 Apr 2026 22:39:30 GMT</pubDate><ttl>60</ttl><item><title>[导入][AppFuse] AppFuse使用手记－－DWR（十） [原]</title><link>http://www.blogjava.net/heyday/archive/2008/05/13/200254.html</link><dc:creator>不同樊响</dc:creator><author>不同樊响</author><pubDate>Tue, 13 May 2008 09:40:00 GMT</pubDate><guid>http://www.blogjava.net/heyday/archive/2008/05/13/200254.html</guid><wfw:comment>http://www.blogjava.net/heyday/comments/200254.html</wfw:comment><comments>http://www.blogjava.net/heyday/archive/2008/05/13/200254.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/heyday/comments/commentRss/200254.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/heyday/services/trackbacks/200254.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: &nbsp;&nbsp;&nbsp; 在AppFuse实现级联下拉列表最方便的方式是使用DWR了，AppFuse默认就支持DWR。web.xml里DWR配置部分开始就存在了。&nbsp;&nbsp;&nbsp; web.xml：&nbsp;1&nbsp;&nbsp;&nbsp;&nbsp;&lt;servlet&gt;&nbsp;2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&...&nbsp;&nbsp;<a href='http://www.blogjava.net/heyday/archive/2008/05/13/200254.html'>阅读全文</a><img src ="http://www.blogjava.net/heyday/aggbug/200254.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/heyday/" target="_blank">不同樊响</a> 2008-05-13 17:40 <a href="http://www.blogjava.net/heyday/archive/2008/05/13/200254.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[导入][AppFuse] AppFuse使用手记－－安装（一）[原]</title><link>http://www.blogjava.net/heyday/archive/2008/05/04/198261.html</link><dc:creator>不同樊响</dc:creator><author>不同樊响</author><pubDate>Sun, 04 May 2008 12:57:00 GMT</pubDate><guid>http://www.blogjava.net/heyday/archive/2008/05/04/198261.html</guid><wfw:comment>http://www.blogjava.net/heyday/comments/198261.html</wfw:comment><comments>http://www.blogjava.net/heyday/archive/2008/05/04/198261.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/heyday/comments/commentRss/198261.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/heyday/services/trackbacks/198261.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp; 参考&nbsp;<A class=diary_url href="http://appfuse.org/display/apf/appfuse+quickstart" target=_blank>AppFuse QuickStart</A><BR><BR>&nbsp;&nbsp;&nbsp; 有几个地方要注意：<BR><BR>&nbsp;&nbsp;&nbsp; 1。Maven 默认是联网从repository获取dependencies。如果需要离网开发，可以下载<A class=diary_url href="https://appfuse.dev.java.net/files/documents/1397/77087/appfuse-dependencies-2.0.1-with-source-and-javadoc.zip">Dependencies (with source and javadoc)</A> 。解压到Maven的仓库目录。<BR><BR>&nbsp;&nbsp;&nbsp; 2。Maven的仓库目录默认位置在%HOME%/.m2/repository。如果你想自己指定仓库的目录，可通过修改%M2_HOME%/conf/settings.xml里的localRepository配置。<BR><BR>&nbsp;&nbsp;&nbsp; 3。如果是通过代理上网，同样可以修改%M2_HOME%/conf/settings.xml里的proxies配置，连接网络。<BR><BR>&nbsp;&nbsp;&nbsp; PS：Maven相当的不熟，加上公司的代理上网，折腾了好半天啊。<IMG alt=face src="http://sys2.blogcn.com/control/images/em/1/10.gif"> <br>文章来源:<a href='
http://heyday.blogcn.com/diary,14380587.shtml'>
http://heyday.blogcn.com/diary,14380587.shtml</a><img src ="http://www.blogjava.net/heyday/aggbug/198261.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/heyday/" target="_blank">不同樊响</a> 2008-05-04 20:57 <a href="http://www.blogjava.net/heyday/archive/2008/05/04/198261.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[导入][AppFuse] AppFuse使用手记－－试例（二） [原]</title><link>http://www.blogjava.net/heyday/archive/2008/05/04/198260.html</link><dc:creator>不同樊响</dc:creator><author>不同樊响</author><pubDate>Sun, 04 May 2008 12:57:00 GMT</pubDate><guid>http://www.blogjava.net/heyday/archive/2008/05/04/198260.html</guid><wfw:comment>http://www.blogjava.net/heyday/comments/198260.html</wfw:comment><comments>http://www.blogjava.net/heyday/archive/2008/05/04/198260.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/heyday/comments/commentRss/198260.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/heyday/services/trackbacks/198260.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp; 1。可以使用“mvn appfuse:gen-model”依据数据库的表生成POJO，如果你非常熟悉JPA也可以手写POJO，位置在DgroupId.model下。再通过“mvn appfuse:gen -Dentity=Name”生成CURD类。<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; 2。如果POJO不存在关联关系，那么执行“mvn appfuse:gen -Dentity=Name”时，如果Entity没有在hibernate.cfg.xml里，则会自动增加。如果存在关联关系，在POJO里注释了@OneToMany或者 @ManyToMany，直接执行“mvn appfuse:gen -Dentity=Name”很容易报一下错误：<BR>
<DIV style="BORDER-RIGHT: rgb(204,204,204) 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: rgb(204,204,204) 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; BORDER-LEFT: rgb(204,204,204) 1px solid; WIDTH: 98%; PADDING-TOP: 4px; BORDER-BOTTOM: rgb(204,204,204) 1px solid; BACKGROUND-COLOR: rgb(238,238,238)">&nbsp;&nbsp;&nbsp; [INFO] ------------------------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp; [ERROR] FATAL ERROR<BR>&nbsp;&nbsp;&nbsp; [INFO] ------------------------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp; [INFO] Use of @OneToMany or @ManyToMany targeting an unmapped class: com.reda.app.model.CompanyType.<BR>&nbsp;&nbsp;&nbsp; companies[com.reda.app.model.Company]<BR>&nbsp;&nbsp;&nbsp; [INFO] ------------------------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp; [INFO] Trace<BR>&nbsp;&nbsp;&nbsp; org.hibernate.AnnotationException: Use of @OneToMany or @ManyToMany targeting an unmapped class: com<BR>&nbsp;&nbsp;&nbsp; .reda.app.model.CompanyType.companies[com.reda.app.model.Company]<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.hibernate.cfg.annotations.CollectionBinder.bindManyToManySecondPass(CollectionBinder.<BR>&nbsp;&nbsp;&nbsp; java:979)<BR>&nbsp;&nbsp;&nbsp; ......</DIV>&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; 因为“mvn appfuse:gen -Dentity=Name”一次只支持一个Entity（这样执行会很累啊），会找不到对应的关联者。这时，我们需要手动的将有关联关系的Entity都加入到hibernate.cfg.xml里，再执行就可以了。<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; 3。执行“mvn jetty:run-war”时，会根据POJO先删除数据库里的表再重建，如果不想对数据进行操作可以修改pom.xml，将drop熟悉修改为false。不过执行“mvn jetty:run-war”仍然会执行建表操作，出现大量的错误日志，不过没有影响。<BR>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><SPAN style="COLOR: #008080">&nbsp;1</SPAN><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif"><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">groupId</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">org.codehaus.mojo</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">groupId</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;2</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">artifactId</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">hibernate3-maven-plugin</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">artifactId</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;3</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">version</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">2.0-alpha-2</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">version</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;4</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">configuration</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;5</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">components</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;6</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">component</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;7</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">name</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">hbm2ddl</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">name</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;8</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">implementation</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">annotationconfiguration</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">implementation</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;9</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">&lt;!--</SPAN><SPAN style="COLOR: #008000">&nbsp;Use&nbsp;'jpaconfiguration'&nbsp;if&nbsp;you're&nbsp;using&nbsp;JPA.&nbsp;</SPAN><SPAN style="COLOR: #008000">--&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">10</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">&lt;!--</SPAN><SPAN style="COLOR: #008000">&lt;implementation&gt;jpaconfiguration&lt;/implementation&gt;</SPAN><SPAN style="COLOR: #008000">--&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">11</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">component</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">12</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">components</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">13</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">componentProperties</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">14</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><FONT style="BACKGROUND-COLOR: #ff6666"><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">drop</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">false</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">drop</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN></FONT><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">15</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">jdk5</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">true</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">jdk5</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">16</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">propertyfile</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">target/classes/jdbc.properties</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">propertyfile</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">17</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">skip</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">${maven.test.skip}</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">skip</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">18</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">componentProperties</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">19</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">configuration</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN></DIV>
<P><BR>&nbsp;&nbsp;&nbsp; 4。执行“mvn jetty:run-war”时，会清空数据表的数据并插入默认的数据，默认的数据在%PROJECT_HOME%\src\main\resources\default-data.xml配置，这个很讨厌。修改pom.xml可以屏蔽这部分操作。<BR<DIV style="BORDER-RIGHT: rgb(204,204,204) 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: rgb(204,204,204) 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; BORDER-LEFT: rgb(204,204,204) 1px solid; WIDTH: 98%; PADDING-TOP: 4px; BORDER-BOTTOM: rgb(204,204,204) 1px solid; BACKGROUND-COLOR: rgb(238,238,238)"> 
<DIV></DIV>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;<SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">dbunit</SPAN><SPAN style="COLOR: #ff0000">.operation.type</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">NONE</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">dbunit.operation.type</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN></DIV>
<P>&nbsp;&nbsp;&nbsp; 5。执行“mvn jetty:run-war”时，会执行测试，很XP喔。如果测试通不过服务就起不来。找了很多配置似乎都跳不过这一步。<BR>&nbsp;&nbsp;&nbsp; appfuse:gen-model时生成的POJO，自增列不会生成@Column注释，就容易报以下的错误，增加相应的@Column就可以了：&nbsp; </P>
<DIV style="BORDER-RIGHT: rgb(204,204,204) 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: rgb(204,204,204) 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; BORDER-LEFT: rgb(204,204,204) 1px solid; WIDTH: 98%; PADDING-TOP: 4px; BORDER-BOTTOM: rgb(204,204,204) 1px solid; BACKGROUND-COLOR: rgb(238,238,238)">&nbsp;&nbsp;&nbsp;Unknown column 'this_.typeId' in 'field list'</DIV>&nbsp;&nbsp;&nbsp;&nbsp;另外生成的测试类也不是直接可以测试通过的，还要针对数据做一些修改。如果POJO存在关联关系，测试类的关联部分也需要进行手动设值的。 
<P></P><br>文章来源:<a href='
http://heyday.blogcn.com/diary,14897952.shtml'>
http://heyday.blogcn.com/diary,14897952.shtml</a><img src ="http://www.blogjava.net/heyday/aggbug/198260.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/heyday/" target="_blank">不同樊响</a> 2008-05-04 20:57 <a href="http://www.blogjava.net/heyday/archive/2008/05/04/198260.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[导入][AppFuse] AppFuse使用手记－－目录结构（三） [原]</title><link>http://www.blogjava.net/heyday/archive/2008/05/04/198259.html</link><dc:creator>不同樊响</dc:creator><author>不同樊响</author><pubDate>Sun, 04 May 2008 12:57:00 GMT</pubDate><guid>http://www.blogjava.net/heyday/archive/2008/05/04/198259.html</guid><wfw:comment>http://www.blogjava.net/heyday/comments/198259.html</wfw:comment><comments>http://www.blogjava.net/heyday/archive/2008/05/04/198259.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/heyday/comments/commentRss/198259.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/heyday/services/trackbacks/198259.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp; 先说明一下，没找到官方文档，对maven也不熟悉，下面的部分完全是自己摸索总结的，如果有什么问题，欢迎指正。<BR><BR>&nbsp;&nbsp;&nbsp; AppFuse的目录结构大致如下：<BR><BR>
<DIV style="BORDER-RIGHT: rgb(204,204,204) 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: rgb(204,204,204) 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; BORDER-LEFT: rgb(204,204,204) 1px solid; WIDTH: 98%; PADDING-TOP: 4px; BORDER-BOTTOM: rgb(204,204,204) 1px solid; BACKGROUND-COLOR: rgb(238,238,238)">&nbsp;&nbsp;&nbsp; %PROJECT_HOME%<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ├---src (1)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ┆&nbsp;&nbsp;&nbsp; ├---main<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ┆&nbsp;&nbsp;&nbsp; ┆&nbsp;&nbsp;&nbsp; ├---java&nbsp; (3)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ┆&nbsp;&nbsp;&nbsp; ┆&nbsp;&nbsp;&nbsp; ├---resources (4)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ┆&nbsp;&nbsp;&nbsp; ┆&nbsp;&nbsp;&nbsp; ├---webapp&nbsp;&nbsp;&nbsp; (5)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ┆&nbsp;&nbsp;&nbsp; ├---site<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ┆&nbsp;&nbsp;&nbsp; ├---test&nbsp;&nbsp; (6)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ┆&nbsp;&nbsp;&nbsp; ┆&nbsp;&nbsp;&nbsp; ├---java<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ┆&nbsp;&nbsp;&nbsp; ┆&nbsp;&nbsp;&nbsp; ├---resources&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ├---target&nbsp; (2)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ┆&nbsp;&nbsp;&nbsp; ├---appfuse&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ┆&nbsp;&nbsp;&nbsp; ┆&nbsp;&nbsp;&nbsp; ├---generated-sources (7)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ┆&nbsp;&nbsp;&nbsp; ├---classes&nbsp;&nbsp;&nbsp; (8)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ┆&nbsp;&nbsp;&nbsp; ├---reda-1.0-SNAPSHOT.war&nbsp; (9)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ┆&nbsp;&nbsp;&nbsp; ├---reda-1.0-SNAPSHOT&nbsp; (10)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ┆&nbsp;&nbsp;&nbsp; ├---surefire-reports&nbsp;&nbsp; (11)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ┆&nbsp;&nbsp;&nbsp; ├---test-classes&nbsp;&nbsp; (12)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ┆&nbsp;&nbsp;&nbsp; ├---war&nbsp;&nbsp;&nbsp; (13)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ┆&nbsp;&nbsp;&nbsp; ┆&nbsp;&nbsp;&nbsp; ├---work<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ┆&nbsp;&nbsp;&nbsp; ┆&nbsp;&nbsp;&nbsp; ┆&nbsp;&nbsp;&nbsp; ├---appfuse-struts-2.0.1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ┆&nbsp;&nbsp;&nbsp; ┆&nbsp;&nbsp;&nbsp; ┆&nbsp;&nbsp;&nbsp; ├---appfuse-web-common-2.0.1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ┆&nbsp;&nbsp;&nbsp; ├---warpath&nbsp;&nbsp;&nbsp; (14)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ┆&nbsp;&nbsp;&nbsp; ├---work&nbsp;&nbsp; (15)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ┆&nbsp;&nbsp;&nbsp; ┆&nbsp;&nbsp;&nbsp; ├---jsp<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ┆&nbsp;&nbsp;&nbsp; ┆&nbsp;&nbsp;&nbsp; ├---webapp</DIV>
<P><BR>&nbsp;&nbsp;&nbsp; (1) 源代码目录，我们要修改代码应该是在这个目录。<BR>&nbsp;&nbsp;&nbsp; (2) 目标目录，这部分目录基本上是执行相关命令生成的。<BR>&nbsp;&nbsp;&nbsp; (3) java源代码目录，包括POJO、Action等<BR>&nbsp;&nbsp;&nbsp; (4) 资源目录，包括配置文件等<BR>&nbsp;&nbsp;&nbsp; (5) web应用源代码目录<BR>&nbsp;&nbsp;&nbsp; (6) 测试源代码目录<BR>&nbsp;&nbsp;&nbsp; (7) appfuse自动生成的代码<BR>&nbsp;&nbsp;&nbsp; (8) 源代码编译输出目录<BR>&nbsp;&nbsp;&nbsp; (9) 项目的war<BR>&nbsp;&nbsp;&nbsp; (10) 由(9)解压的目录<BR>&nbsp;&nbsp;&nbsp; (11) 自动测试报表目录&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; (12) 自动测试编译输出目录&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; (13) war包解压目录<BR>&nbsp;&nbsp;&nbsp; (14) war解压目录<BR>&nbsp;&nbsp;&nbsp; (15) jetty发布目录</P>
<P>&nbsp;&nbsp;&nbsp; 运行“<FONT color=#000099>mvn jetty:run-war</FONT>”的顺序是：<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; 1。(1)的代码编译输出到(8)，等同于执行“<FONT color=#000099>mvn warpath:add-classes</FONT>”。<BR>&nbsp;&nbsp;&nbsp; 2。生成(13)的war，只有(1)的部分不包括web应用。<BR>&nbsp;&nbsp;&nbsp; 3。(4)的资源文件native2ascii，同时发布到(8)，等同于执行“<FONT style="BACKGROUND-COLOR: #ffffff" color=#000099>mvn native2ascii:native2ascii</FONT>”。<BR>&nbsp;&nbsp;&nbsp; 5。将(4)配置文件发布到(8)，等同于执行“<FONT color=#000099>mvn resources:resources</FONT>”。<BR>&nbsp;&nbsp;&nbsp; 6。(6)的代码编译输出到(12)。<BR>&nbsp;&nbsp;&nbsp; 7。(6)的资源文件native2ascii，同时发布到(12)。<BR>&nbsp;&nbsp;&nbsp; 8。自动测试生成测试报告到(11)。<BR>&nbsp;&nbsp;&nbsp; 9。生成(15)。<BR>&nbsp;&nbsp;&nbsp; 10。生成(13)。<BR>&nbsp;&nbsp;&nbsp; 11。将(15)打包生成(9)。<BR><BR>&nbsp;&nbsp;&nbsp; 执行“<FONT color=#000099>mvn jetty:run-war</FONT>”的相关日志信息，可以看出“<FONT color=#000099>mvn jetty:run-war</FONT>”先后调用了那些命令。</P>
<DIV style="BORDER-RIGHT: rgb(204,204,204) 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: rgb(204,204,204) 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; BORDER-LEFT: rgb(204,204,204) 1px solid; WIDTH: 98%; PADDING-TOP: 4px; BORDER-BOTTOM: rgb(204,204,204) 1px solid; BACKGROUND-COLOR: rgb(238,238,238)">&nbsp;&nbsp;&nbsp; [INFO] [warpath:add-classes {execution: default}]<BR>&nbsp;&nbsp;&nbsp; [INFO] [aspectj:compile {execution: default}]<BR>&nbsp;&nbsp;&nbsp; [INFO] [native2ascii:native2ascii {execution: native2ascii-utf8}]<BR>&nbsp;&nbsp;&nbsp; [INFO] [native2ascii:native2ascii {execution: native2ascii-8859_1}]<BR>&nbsp;&nbsp;&nbsp; [INFO] [resources:resources]<BR>&nbsp;&nbsp;&nbsp; [INFO] [compiler:compile]<BR>&nbsp;&nbsp;&nbsp; [INFO] [resources:testResources]<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; [INFO] [warpath:add-classes {execution: default}]<BR>&nbsp;&nbsp;&nbsp; [INFO] [aspectj:compile {execution: default}]<BR>&nbsp;&nbsp;&nbsp; [INFO] [native2ascii:native2ascii {execution: native2ascii-utf8}]<BR>&nbsp;&nbsp;&nbsp; [INFO] [native2ascii:native2ascii {execution: native2ascii-8859_1}]<BR>&nbsp;&nbsp;&nbsp; [INFO] [resources:resources]<BR>&nbsp;&nbsp;&nbsp; [INFO] [hibernate3:hbm2ddl {execution: default}]<BR>&nbsp;&nbsp;&nbsp; [INFO] [dbunit:operation {execution: test}]<BR>&nbsp;&nbsp;&nbsp; [INFO] [war:war]<BR>&nbsp;&nbsp;&nbsp; [INFO] [jetty:run-war]</DIV><BR>&nbsp;&nbsp;&nbsp; 运行“<FONT color=#000099>mvn war:inplace</FONT>”，可以将(5)生成。 但是(4)的资源文件和配置文件是不会同步到(5)下面。要将(4)的配置文件同步到(5)下，需要在运行“mvn war:inplace”前先执行“<FONT color=#000099>mvn resources:resources</FONT>”，同于将(4)的资源文件同步到(5)下，需要在运行“<FONT color=#000099>mvn war:inpla<STRONG>ce</STRONG></FONT>”前先执行“<FONT color=#000099>mvn native2ascii:native2ascii</FONT>”。&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; 我们一般在(5)下进行开发（如果在(10)或者(15)下开发，运行“<FONT color=#000099>mvn jetty:run-war</FONT>”会将代码冲掉），运行“<FONT color=#000099>mvn jetty:run</FONT>”启动Web服务，需要注意的是必须删除src\main\webapp\WEB-INF\lib和src\main\webapp\WEB-INF\classes\struts.xml，否则会报错。如果习惯使用Tomcat，也可以将Tomcat的配置指向src\main\webapp，当然src\main\webapp\WEB-INF\lib和src\main\webapp\WEB-INF\classes\struts.xml就不需要删除了。<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; 当然在运行“<FONT color=#000099>mvn appfuse:gen-model</FONT>”和“<FONT color=#000099>mvn appfuse:gen -Dentity=Name</FONT>”时，生成的文件都会安装到(15)，只要再执行“<FONT color=#000099>mvn war:inplace</FONT>”就可以了。 <br>文章来源:<a href='
http://heyday.blogcn.com/diary,14999843.shtml'>
http://heyday.blogcn.com/diary,14999843.shtml</a><img src ="http://www.blogjava.net/heyday/aggbug/198259.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/heyday/" target="_blank">不同樊响</a> 2008-05-04 20:57 <a href="http://www.blogjava.net/heyday/archive/2008/05/04/198259.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[导入][AppFuse] AppFuse使用手记－－数据库中文问题（四） [原]</title><link>http://www.blogjava.net/heyday/archive/2008/05/04/198258.html</link><dc:creator>不同樊响</dc:creator><author>不同樊响</author><pubDate>Sun, 04 May 2008 12:57:00 GMT</pubDate><guid>http://www.blogjava.net/heyday/archive/2008/05/04/198258.html</guid><wfw:comment>http://www.blogjava.net/heyday/comments/198258.html</wfw:comment><comments>http://www.blogjava.net/heyday/archive/2008/05/04/198258.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/heyday/comments/commentRss/198258.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/heyday/services/trackbacks/198258.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp; 先按以前的经验，<A class=diary_url href="http://heyday.blogcn.com/diary,101172001.shtml" target=_blank>[MYSQL] 三步解决MysSQL中文问题</A> 。<BR><BR>&nbsp;&nbsp;&nbsp; 修改pom.xml：<BR>
<DIV style="BORDER-RIGHT: rgb(204,204,204) 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: rgb(204,204,204) 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; BORDER-LEFT: rgb(204,204,204) 1px solid; WIDTH: 98%; PADDING-TOP: 4px; BORDER-BOTTOM: rgb(204,204,204) 1px solid; BACKGROUND-COLOR: rgb(238,238,238)">&nbsp;&nbsp;&nbsp; &lt;jdbc.url&gt;&lt;![CDATA[jdbc:mysql://localhost/reda?createDatabaseIfNotExist=true&amp;amp;characterEncoding=gbk]]&gt;&lt;/jdbc.url&gt;</DIV>&nbsp;<BR>&nbsp;&nbsp; 修改taglibs.jsp： 
<DIV style="BORDER-RIGHT: rgb(204,204,204) 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: rgb(204,204,204) 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; BORDER-LEFT: rgb(204,204,204) 1px solid; WIDTH: 98%; PADDING-TOP: 4px; BORDER-BOTTOM: rgb(204,204,204) 1px solid; BACKGROUND-COLOR: rgb(238,238,238)">&nbsp;&nbsp;&nbsp; &lt;%@ page language="java" errorPage="/error.jsp" pageEncoding="GBK" contentType="text/html;charset=GBK" %&gt;</DIV>&nbsp;<BR>&nbsp;&nbsp; 修改web.xml：<BR>
<DIV style="BORDER-RIGHT: rgb(204,204,204) 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: rgb(204,204,204) 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; BORDER-LEFT: rgb(204,204,204) 1px solid; WIDTH: 98%; PADDING-TOP: 4px; BORDER-BOTTOM: rgb(204,204,204) 1px solid; BACKGROUND-COLOR: rgb(238,238,238)">&nbsp;&nbsp;&nbsp; &lt;filter&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;filter-name&gt;encodingFilter&lt;/filter-name&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;filter-class&gt;org.springframework.web.filter.CharacterEncodingFilter&lt;/filter-class&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;init-param&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;param-name&gt;encoding&lt;/param-name&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;param-value&gt;GBK&lt;/param-value&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/init-param&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;init-param&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;param-name&gt;forceEncoding&lt;/param-name&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;param-value&gt;true&lt;/param-value&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/init-param&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;/filter&gt;</DIV><BR>&nbsp;&nbsp;&nbsp; 结果，查询显示正确，但是更新和插入都出现乱码。<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; 反复折腾了好久，更新和插入还是乱码，估计是AppFuse里哪部分代码做了字符转行，现在对AppFuse还不是很熟悉，也不知道该从哪里下手。<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; 上网查了查，说UTF-8编码是一种兼容所有语言的编码方式，所以UTF-8才是王道。又绕回到UTF-8上来，既然AppFuse默认就是UTF-8，那问题就应该不是出在AppFuse上，应该是在MySQL上。<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; 把数据库全都切换到utf8上，数据库和表的DDL都加上字符集设置：<BR>
<DIV style="BORDER-RIGHT: rgb(204,204,204) 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: rgb(204,204,204) 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; BORDER-LEFT: rgb(204,204,204) 1px solid; WIDTH: 98%; PADDING-TOP: 4px; BORDER-BOTTOM: rgb(204,204,204) 1px solid; BACKGROUND-COLOR: rgb(238,238,238)">&nbsp;&nbsp;&nbsp; CHARACTER SET utf8 COLLATE utf8_general_ci</DIV><BR>&nbsp;&nbsp;&nbsp; 修改MySQL的配置文件my.ini：<BR>
<DIV style="BORDER-RIGHT: rgb(204,204,204) 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: rgb(204,204,204) 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; BORDER-LEFT: rgb(204,204,204) 1px solid; WIDTH: 98%; PADDING-TOP: 4px; BORDER-BOTTOM: rgb(204,204,204) 1px solid; BACKGROUND-COLOR: rgb(238,238,238)">&nbsp;&nbsp;&nbsp; default-character-set=utf8</DIV><BR>&nbsp;&nbsp;&nbsp; 可以通过下面的命令查看字符集：<BR>
<DIV style="BORDER-RIGHT: rgb(204,204,204) 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: rgb(204,204,204) 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; BORDER-LEFT: rgb(204,204,204) 1px solid; WIDTH: 98%; PADDING-TOP: 4px; BORDER-BOTTOM: rgb(204,204,204) 1px solid; BACKGROUND-COLOR: rgb(238,238,238)">&nbsp;&nbsp;&nbsp; mysql&gt;&nbsp; show variables like 'character_set_%';<BR>&nbsp;&nbsp;&nbsp; +--------------------------+-----------------------------------------------+<BR>&nbsp;&nbsp;&nbsp; | Variable_name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Value&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<BR>&nbsp;&nbsp;&nbsp; +--------------------------+-----------------------------------------------+<BR>&nbsp;&nbsp;&nbsp; | character_set_client&nbsp;&nbsp;&nbsp;&nbsp; | utf8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<BR>&nbsp;&nbsp;&nbsp; | character_set_connection | utf8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<BR>&nbsp;&nbsp;&nbsp; | character_set_database&nbsp;&nbsp; | utf8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<BR>&nbsp;&nbsp;&nbsp; | character_set_filesystem | binary&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<BR>&nbsp;&nbsp;&nbsp; | character_set_results&nbsp;&nbsp;&nbsp; | utf8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<BR>&nbsp;&nbsp;&nbsp; | character_set_server&nbsp;&nbsp;&nbsp;&nbsp; | utf8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<BR>&nbsp;&nbsp;&nbsp; | character_set_system&nbsp;&nbsp;&nbsp;&nbsp; | utf8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<BR>&nbsp;&nbsp;&nbsp; | character_sets_dir&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | D:\Dev\MySQL\MySQL Server 5.0\share\charsets\ |<BR>&nbsp;&nbsp;&nbsp; +--------------------------+-----------------------------------------------+</DIV><BR>&nbsp;&nbsp;&nbsp; 经过上面的修改，中文问题就解决了，AppFuse的CRUD都正常了。<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; 如果使用MySQL Command Line Client，我们查看数据库看到是还是乱码，执行插入时还会报错：“ Data too long for column 'type_name' at row 1”。可以在执行前，先执行：set names gbk，这样就可以了。<BR>
<DIV style="BORDER-RIGHT: rgb(204,204,204) 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: rgb(204,204,204) 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; BORDER-LEFT: rgb(204,204,204) 1px solid; WIDTH: 98%; PADDING-TOP: 4px; BORDER-BOTTOM: rgb(204,204,204) 1px solid; BACKGROUND-COLOR: rgb(238,238,238)">&nbsp;&nbsp;&nbsp; mysql&gt; set names utf8;<BR>&nbsp;&nbsp;&nbsp; Query OK, 0 rows affected (0.00 sec)<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; mysql&gt; select * from company_type;<BR>&nbsp;&nbsp;&nbsp; +---------+-----------+--------+<BR>&nbsp;&nbsp;&nbsp; | type_id | type_name | status |<BR>&nbsp;&nbsp;&nbsp; +---------+-----------+--------+<BR>&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 | 娴嬭瘯&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<BR>&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2 | 鍑洪敊&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<BR>&nbsp;&nbsp;&nbsp; +---------+-----------+--------+<BR>&nbsp;&nbsp;&nbsp; 2 rows in set (0.00 sec)<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; mysql&gt; insert into company_type(type_name,status) values('出错',1);<BR>&nbsp;&nbsp;&nbsp; ERROR 1406 (22001): Data too long for column 'type_name' at row 1<BR>&nbsp;&nbsp;&nbsp; mysql&gt; set names gbk;<BR>&nbsp;&nbsp;&nbsp; Query OK, 0 rows affected (0.00 sec)<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; mysql&gt; insert into company_type(type_name,status) values('出错',1);<BR>&nbsp;&nbsp;&nbsp; Query OK, 1 row affected (0.03 sec)<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; mysql&gt; select * from company_type;<BR>&nbsp;&nbsp;&nbsp; +---------+-----------+--------+<BR>&nbsp;&nbsp;&nbsp; | type_id | type_name | status |<BR>&nbsp;&nbsp;&nbsp; +---------+-----------+--------+<BR>&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 | 测试&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<BR>&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2 | 出错&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<BR>&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3 | 出错&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<BR>&nbsp;&nbsp;&nbsp; +---------+-----------+--------+<BR>&nbsp;&nbsp;&nbsp; 3 rows in set (0.00 sec)</DIV><BR><BR><BR>&nbsp;&nbsp;&nbsp;&nbsp; 附一：Mysql中校对集utf8_unicode_ci与utf8_general_ci的区别<BR>
<DIV style="BORDER-RIGHT: rgb(204,204,204) 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: rgb(204,204,204) 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; BORDER-LEFT: rgb(204,204,204) 1px solid; WIDTH: 98%; PADDING-TOP: 4px; BORDER-BOTTOM: rgb(204,204,204) 1px solid; BACKGROUND-COLOR: rgb(238,238,238)">
<P>当前，utf8_unicode_ci校对规则仅部分支持Unicode校对规则算法。一些字符还是不能支持。并且，不能完全支持组合的记号。这主要影响越南和俄罗斯的一些少数民族语言，如：Udmurt 、Tatar、Bashkir和Mari。</P>
<P>&nbsp;&nbsp;&nbsp; utf8_unicode_ci的最主要的特色是支持扩展，即当把一个字母看作与其它字母组合相等时。例如，在德语和一些其它语言中‘ß’等于‘ss’。</P>
<P>&nbsp;&nbsp;&nbsp; utf8_general_ci是一个遗留的 校对规则，不支持扩展。它仅能够在字符之间进行逐个比较。这意味着utf8_general_ci校对规则进行的比较速度很快，但是与使用utf8_unicode_ci的 校对规则相比，比较正确性较差）。</P>
<P>&nbsp;&nbsp;&nbsp; 例如，使用utf8_general_ci和utf8_unicode_ci两种 校对规则下面的比较相等：<BR>&nbsp;&nbsp;&nbsp; Ä = A<BR>&nbsp;&nbsp;&nbsp; Ö = O<BR>&nbsp;&nbsp;&nbsp; Ü = U</P>
<P>&nbsp;&nbsp;&nbsp; 两种校对规则之间的区别是，对于utf8_general_ci下面的等式成立：<BR>&nbsp;&nbsp;&nbsp; ß = s</P>
<P>&nbsp;&nbsp;&nbsp; 但是，对于utf8_unicode_ci下面等式成立：<BR>&nbsp;&nbsp;&nbsp; ß = ss</P>
<P>&nbsp;&nbsp;&nbsp; 对于一种语言仅当使用utf8_unicode_ci排序做的不好时，才执行与具体语言相关的utf8字符集 校对规则。例如，对于德语和法语，utf8_unicode_ci工作的很好，因此不再需要为这两种语言创建特殊的utf8校对规则。</P>
<P>&nbsp;&nbsp;&nbsp; utf8_general_ci也适用与德语和法语，除了‘ß’等于‘s’，而不是‘ss’之外。如果你的应用能够接受这些，那么应该使用utf8_general_ci，因为它速度快。否则，使用utf8_unicode_ci，因为它比较准确。</P></DIV><BR>&nbsp;&nbsp;&nbsp; 附二：<BR>&nbsp;&nbsp;&nbsp; 使用MySQL的命令终端时，如果输入SQL有误，将有beep声。若要关闭该功能，根据mysql --help，使用mysql --no-beep即可。 <BR>&nbsp;&nbsp;&nbsp; 修改my.ini <BR>&nbsp;&nbsp;&nbsp; 在[mysql] 下加入一行&nbsp;：&nbsp; <BR>
<DIV style="BORDER-RIGHT: rgb(204,204,204) 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: rgb(204,204,204) 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; BORDER-LEFT: rgb(204,204,204) 1px solid; WIDTH: 98%; PADDING-TOP: 4px; BORDER-BOTTOM: rgb(204,204,204) 1px solid; BACKGROUND-COLOR: rgb(238,238,238)">&nbsp;&nbsp;&nbsp; no-beep&nbsp;&nbsp;&nbsp;</DIV><br>文章来源:<a href='
http://heyday.blogcn.com/diary,15090253.shtml'>
http://heyday.blogcn.com/diary,15090253.shtml</a><img src ="http://www.blogjava.net/heyday/aggbug/198258.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/heyday/" target="_blank">不同樊响</a> 2008-05-04 20:57 <a href="http://www.blogjava.net/heyday/archive/2008/05/04/198258.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[导入][AppFuse] AppFuse使用手记－－资源文件中文问题（五） [原]</title><link>http://www.blogjava.net/heyday/archive/2008/05/04/198257.html</link><dc:creator>不同樊响</dc:creator><author>不同樊响</author><pubDate>Sun, 04 May 2008 12:57:00 GMT</pubDate><guid>http://www.blogjava.net/heyday/archive/2008/05/04/198257.html</guid><wfw:comment>http://www.blogjava.net/heyday/comments/198257.html</wfw:comment><comments>http://www.blogjava.net/heyday/archive/2008/05/04/198257.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/heyday/comments/commentRss/198257.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/heyday/services/trackbacks/198257.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp; AppFuse使用“mvn native2ascii:native2ascii”进行文件编码格式的转换。但是转换后，界面显示仍然是乱码。打开ApplicationResources_zh_CN.properties文件，里面是中文貌似已经转换为ascii。但是仔细看，ApplicationResources_zh_CN.properties文件仍然是GB18030。<BR>&nbsp;<BR>&nbsp;&nbsp;&nbsp; 在网上找了找，如果在%PROJECT_HOME%运行：<BR>
<DIV style="BORDER-RIGHT: rgb(204,204,204) 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: rgb(204,204,204) 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; BORDER-LEFT: rgb(204,204,204) 1px solid; WIDTH: 98%; PADDING-TOP: 4px; BORDER-BOTTOM: rgb(204,204,204) 1px solid; BACKGROUND-COLOR: rgb(238,238,238)">&nbsp;&nbsp;&nbsp; native2ascii -encoding UTF-8 .\src\main\resources\ApplicationResources_zh_CN.properties .\src\main\webapp\WEB-INF\classes\ApplicationResources_zh_CN.properties </DIV>&nbsp;&nbsp;&nbsp; 则显示正常。<BR><BR>&nbsp;&nbsp;&nbsp; AppFuse的pom.xml里明明制定了UTF-8，为什么文件就变成了GB18030呢？<BR>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><SPAN style="COLOR: #008080">&nbsp;1</SPAN><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif"><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">plugin</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;2</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">groupId</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">org.codehaus.mojo</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">groupId</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;3</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">artifactId</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">native2ascii-maven-plugin</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">artifactId</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;4</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">version</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">1.0-alpha-1</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">version</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;5</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">configuration</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;6</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">dest</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">target/classes</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">dest</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;7</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">src</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">src/main/resources</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">src</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;8</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">configuration</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;9</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">executions</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">10</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">execution</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">11</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">id</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">native2ascii-utf8</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">id</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">12</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">goals</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">13</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">goal</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">native2ascii</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">goal</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">14</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">goals</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">15</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">configuration</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">16</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">encoding</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">UTF8</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">encoding</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">17</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">includes</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">18</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ApplicationResources_ko.properties,<BR></SPAN><SPAN style="COLOR: #008080">19</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ApplicationResources_no.properties,<BR></SPAN><SPAN style="COLOR: #008080">20</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ApplicationResources_tr.properties,<BR></SPAN><SPAN style="COLOR: #008080">21</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ApplicationResources_zh*.properties<BR></SPAN><SPAN style="COLOR: #008080">22</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">includes</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">23</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">configuration</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">24</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">execution</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">25</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">execution</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">26</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">id</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">native2ascii-8859_1</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">id</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">27</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">goals</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">28</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">goal</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">native2ascii</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">goal</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">29</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">goals</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">30</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">configuration</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">31</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">encoding</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">8859_1</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">encoding</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">32</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">includes</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">33</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ApplicationResources_de.properties,<BR></SPAN><SPAN style="COLOR: #008080">34</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ApplicationResources_fr.properties,<BR></SPAN><SPAN style="COLOR: #008080">35</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ApplicationResources_nl.properties,<BR></SPAN><SPAN style="COLOR: #008080">36</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ApplicationResources_pt*.properties<BR></SPAN><SPAN style="COLOR: #008080">37</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">includes</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">38</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">configuration</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">39</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">execution</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">40</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">executions</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">41</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">plugin</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN></DIV><BR>&nbsp;&nbsp;&nbsp; 查看JDK的native2ascii文档：<BR>
<DIV style="BORDER-RIGHT: rgb(204,204,204) 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: rgb(204,204,204) 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; BORDER-LEFT: rgb(204,204,204) 1px solid; WIDTH: 98%; PADDING-TOP: 4px; BORDER-BOTTOM: rgb(204,204,204) 1px solid; BACKGROUND-COLOR: rgb(238,238,238)">&nbsp;&nbsp;&nbsp; -encoding encoding_name <BR>&nbsp;&nbsp;&nbsp; Specify the encoding name which is used by the conversion procedure. The default encoding is taken from System property file.encoding. The encoding_name string must be taken from the first column of the table of supported encodings in the Supported Encodings document. </DIV><BR>&nbsp;&nbsp;&nbsp; 原来执行native2ascii时，默认取系统的file.encoding做为编码格式。试着输出file.encoding，果然是GB18030。难道是AppFuse执行“native2ascii:native2ascii”时，没有制定编码？<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; 反编译repository\org\codehaus\mojo\native2ascii-maven-plugin\1.0-alpha-1\native2ascii-maven-plugin-1.0-alpha-1.jar!\org\codehaus\mojo\native2ascii\Native2AsciiMojo.class<BR>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><SPAN style="COLOR: #008080">&nbsp;1</SPAN><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif"><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">protected</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000">&nbsp;executeAnt()<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;2</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_36_454_Open_Image onclick="this.style.display='none'; Codehighlighter1_36_454_Open_Text.style.display='none'; Codehighlighter1_36_454_Closed_Image.style.display='inline'; Codehighlighter1_36_454_Closed_Text.style.display='inline';" src="http://www.blogjava.net/Images/OutliningIndicators/ExpandedBlockStart.gif" align=top src_cetemp="/Images/OutliningIndicators/ExpandedBlockStart.gif"><IMG id=Codehighlighter1_36_454_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_36_454_Closed_Text.style.display='none'; Codehighlighter1_36_454_Open_Image.style.display='inline'; Codehighlighter1_36_454_Open_Text.style.display='inline';" src="http://www.blogjava.net/Images/OutliningIndicators/ContractedBlock.gif" align=top src_cetemp="/Images/OutliningIndicators/ContractedBlock.gif">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN id=Codehighlighter1_36_454_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/Images/dot.gif" src_cetemp="http://www.blogjava.net/Images/dot.gif"></SPAN><SPAN id=Codehighlighter1_36_454_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;3</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/InBlock.gif" align=top src_cetemp="/Images/OutliningIndicators/InBlock.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Project&nbsp;antProject&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;Project();<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;4</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/InBlock.gif" align=top src_cetemp="/Images/OutliningIndicators/InBlock.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;antProject.setName(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">native2ascii</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;5</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/InBlock.gif" align=top src_cetemp="/Images/OutliningIndicators/InBlock.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Native2Ascii&nbsp;antTask&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;Native2Ascii();<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;6</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/InBlock.gif" align=top src_cetemp="/Images/OutliningIndicators/InBlock.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;antTask.setProject(antProject);<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;7</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/InBlock.gif" align=top src_cetemp="/Images/OutliningIndicators/InBlock.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;antTask.setSrc(src);<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;8</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/InBlock.gif" align=top src_cetemp="/Images/OutliningIndicators/InBlock.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;antTask.setDest(dest);<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;9</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/InBlock.gif" align=top src_cetemp="/Images/OutliningIndicators/InBlock.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;antTask.setEncoding(encoding);<BR></SPAN><SPAN style="COLOR: #008080">10</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/InBlock.gif" align=top src_cetemp="/Images/OutliningIndicators/InBlock.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;antTask.setExt(ext);<BR></SPAN><SPAN style="COLOR: #008080">11</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/InBlock.gif" align=top src_cetemp="/Images/OutliningIndicators/InBlock.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;antTask.setExcludes(excludes);<BR></SPAN><SPAN style="COLOR: #008080">12</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/InBlock.gif" align=top src_cetemp="/Images/OutliningIndicators/InBlock.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;antTask.setIncludes(includes);<BR></SPAN><SPAN style="COLOR: #008080">13</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/InBlock.gif" align=top src_cetemp="/Images/OutliningIndicators/InBlock.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;antTask.execute();<BR></SPAN><SPAN style="COLOR: #008080">14</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/ExpandedBlockEnd.gif" align=top src_cetemp="/Images/OutliningIndicators/ExpandedBlockEnd.gif">&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN></DIV>&nbsp;&nbsp;&nbsp; 代码也很简单，调用Ant的API实现转换。估计Ant也不会出现什么问题，为什么会使用系统默认的编码呢？试着输出encoding，发现encoding居然为null！会不会是从pom.xml里没有取到encoding的设置呢？<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; 修改pom.xml，尝试增加encoding节点<BR>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><SPAN style="COLOR: #008080">1</SPAN><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif"><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">groupId</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">org.codehaus.mojo</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">groupId</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">2</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">artifactId</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">native2ascii-maven-plugin</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">artifactId</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">3</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">version</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">1.0-alpha-1</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">version</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">4</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">configuration</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">5</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">dest</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">target/classes</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">dest</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">6</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">src</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">src/main/resources</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">src</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">7</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">encoding</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><FONT style="BACKGROUND-COLOR: #ffff33" color=#ff0000>UTF-8</FONT></SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">encoding</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">8</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">configuration</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN></DIV>&nbsp;&nbsp;&nbsp; 再运行“mvn native2ascii:native2ascii”，发现encoding有值了，但是生成的文件编码还是GB18030，不过运行服务，中文乱码没有了。看来和文件编码没有太大关系，应该是native2ascii转换时采用默认的GB18030编码转换导致的。<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; 另外pom.xml只配置了ApplicationResources_zh*.properties的字符转换，AppFuse还有displaytag_zh.properties也需要转换，我们可以把pom.xml里ApplicationResources_zh*.properties都换成*_zh*.properties就可以了。<BR>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><SPAN style="COLOR: #008080">&nbsp;1</SPAN><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif"><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">configuration</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;2</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">encoding</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">UTF8</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">encoding</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;3</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">includes</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;4</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ApplicationResources_ko.properties,<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;5</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ApplicationResources_no.properties,<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;6</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ApplicationResources_tr.properties,<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;7</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT style="BACKGROUND-COLOR: #ffff33" color=#ff0000>*_zh*.properties<BR></FONT></SPAN><SPAN style="COLOR: #008080">&nbsp;8</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">includes</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;9</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">configuration</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">10</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif"><BR></SPAN><SPAN style="COLOR: #008080">11</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;<IMG src="http://www.blogjava.net/Images/dot.gif" src_cetemp="http://www.blogjava.net/Images/dot.gif"><IMG src="http://www.blogjava.net/Images/dot.gif" src_cetemp="http://www.blogjava.net/Images/dot.gif"><BR></SPAN><SPAN style="COLOR: #008080">12</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">13</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">resource</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">14</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">directory</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">src/main/resources</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">directory</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">15</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">excludes</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">16</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">exclude</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">ApplicationResources_de.properties</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">exclude</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">17</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">exclude</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">ApplicationResources_fr.properties</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">exclude</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">18</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">exclude</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">ApplicationResources_ko.properties</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">exclude</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">19</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">exclude</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">ApplicationResources_nl.properties</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">exclude</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">20</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">exclude</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">ApplicationResources_no.properties</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">exclude</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">21</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">exclude</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">ApplicationResources_pt*.properties</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">exclude</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">22</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">exclude</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">ApplicationResources_tr.properties</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">exclude</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">23</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">exclude</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><FONT style="BACKGROUND-COLOR: #ffff33" color=#ff0000>*_zh*.properties</FONT></SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">exclude</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">24</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">exclude</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">applicationContext-resources.xml</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">exclude</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">25</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">exclude</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">struts.xml</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">exclude</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">26</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">excludes</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">27</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">filtering</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000">true</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">filtering</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">28</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">resource</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN></DIV><br>文章来源:<a href='
http://heyday.blogcn.com/diary,15137426.shtml'>
http://heyday.blogcn.com/diary,15137426.shtml</a><img src ="http://www.blogjava.net/heyday/aggbug/198257.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/heyday/" target="_blank">不同樊响</a> 2008-05-04 20:57 <a href="http://www.blogjava.net/heyday/archive/2008/05/04/198257.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[导入][AppFuse] AppFuse使用手记－－一对多（六） [原]</title><link>http://www.blogjava.net/heyday/archive/2008/05/04/198256.html</link><dc:creator>不同樊响</dc:creator><author>不同樊响</author><pubDate>Sun, 04 May 2008 12:57:00 GMT</pubDate><guid>http://www.blogjava.net/heyday/archive/2008/05/04/198256.html</guid><wfw:comment>http://www.blogjava.net/heyday/comments/198256.html</wfw:comment><comments>http://www.blogjava.net/heyday/archive/2008/05/04/198256.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/heyday/comments/commentRss/198256.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/heyday/services/trackbacks/198256.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp; 先说明一下，单表关系AppFuse默认生成的代码没问题的，CRUD和界面显示都非常正确，简直可以直接发布。一对多还有些小小的问题，需要手工实现部分代码。<BR><BR>&nbsp;&nbsp;&nbsp; 1。先参考 <A class=diary_url href="http://heyday.blogcn.com/diary,14897952.shtml" target=_blank>[AppFuse] AppFuse使用手记－－试例（二） [原]</A> 生成POJO和其它源文件。<BR><BR>&nbsp;&nbsp;&nbsp; 2。修改web.xml，打开lazyLoadingFilter配置，AppFuse原本是支持的，只是默认注释调了，如果没有打开，会报如下错误：<BR>
<DIV style="BORDER-RIGHT: rgb(204,204,204) 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: rgb(204,204,204) 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; BORDER-LEFT: rgb(204,204,204) 1px solid; WIDTH: 98%; PADDING-TOP: 4px; BORDER-BOTTOM: rgb(204,204,204) 1px solid; BACKGROUND-COLOR: rgb(238,238,238)">&nbsp;&nbsp;&nbsp; org.hibernate.LazyInitializationException: could not initialize proxy - no Session<BR>&nbsp;&nbsp;&nbsp; &nbsp;at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:57)<BR>&nbsp;&nbsp;&nbsp; &nbsp;at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:111)<BR>&nbsp;&nbsp;&nbsp; &nbsp;at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:150)</DIV><BR>&nbsp;&nbsp;&nbsp; 3。界面显示显示列表时，一对多的列默认是不显示的，我们需要手工增加display部分。<BR>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><SPAN style="COLOR: #008080">1</SPAN><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif"><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">display:column&nbsp;</SPAN><SPAN style="COLOR: #ff0000">property</SPAN><SPAN style="COLOR: #0000ff">="companyType.typeName"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;sortable</SPAN><SPAN style="COLOR: #0000ff">="true"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;titleKey</SPAN><SPAN style="COLOR: #0000ff">="companyType.typeName"</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN></DIV>&nbsp;<BR>&nbsp;&nbsp;&nbsp; 4。新增和修改时，页面会出现错误，显示不出来，看看JSP页面，AppFuse也要求我们手工修改：<BR>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><SPAN style="COLOR: #008080">1</SPAN><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif"><SPAN style="COLOR: #008000">&lt;!--</SPAN><SPAN style="COLOR: #008000">&nbsp;todo:&nbsp;change&nbsp;this&nbsp;to&nbsp;read&nbsp;the&nbsp;identifier&nbsp;field&nbsp;from&nbsp;the&nbsp;other&nbsp;pojo&nbsp;</SPAN><SPAN style="COLOR: #008000">--&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">2</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/None.gif" align=top src_cetemp="/Images/OutliningIndicators/None.gif"></SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">s:select&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="company.companyType.typeId"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;list</SPAN><SPAN style="COLOR: #0000ff">="companyTypeList"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;listKey</SPAN><SPAN style="COLOR: #0000ff">="typeId"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;listValue</SPAN><SPAN style="COLOR: #0000ff">="typeName"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&gt;&lt;/</SPAN><SPAN style="COLOR: #800000">s:select</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN></DIV><BR>&nbsp;&nbsp;&nbsp; 错误原因主要是因为需要companyTypeList不存在，我们可在Action里实现getCompanyTypeList方法。<BR>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><SPAN style="COLOR: #008080">&nbsp;1</SPAN><IMG id=Codehighlighter1_72_864_Open_Image onclick="this.style.display='none'; Codehighlighter1_72_864_Open_Text.style.display='none'; Codehighlighter1_72_864_Closed_Image.style.display='inline'; Codehighlighter1_72_864_Closed_Text.style.display='inline';" src="http://www.blogjava.net/Images/OutliningIndicators/ExpandedBlockStart.gif" align=top src_cetemp="/Images/OutliningIndicators/ExpandedBlockStart.gif"><IMG id=Codehighlighter1_72_864_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_72_864_Closed_Text.style.display='none'; Codehighlighter1_72_864_Open_Image.style.display='inline'; Codehighlighter1_72_864_Open_Text.style.display='inline';" src="http://www.blogjava.net/Images/OutliningIndicators/ContractedBlock.gif" align=top src_cetemp="/Images/OutliningIndicators/ContractedBlock.gif"><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000">&nbsp;CompanyAction&nbsp;</SPAN><SPAN style="COLOR: #0000ff">extends</SPAN><SPAN style="COLOR: #000000">&nbsp;BaseAction&nbsp;</SPAN><SPAN style="COLOR: #0000ff">implements</SPAN><SPAN style="COLOR: #000000">&nbsp;Preparable&nbsp;</SPAN><SPAN id=Codehighlighter1_72_864_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/Images/dot.gif" src_cetemp="http://www.blogjava.net/Images/dot.gif"></SPAN><SPAN id=Codehighlighter1_72_864_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;2</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/InBlock.gif" align=top src_cetemp="/Images/OutliningIndicators/InBlock.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000">&nbsp;GenericManager</SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">Company,&nbsp;Long</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;companyManager;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;3</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/InBlock.gif" align=top src_cetemp="/Images/OutliningIndicators/InBlock.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><FONT style="BACKGROUND-COLOR: #ffff33"><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000">&nbsp;GenericManager</SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">CompanyType,&nbsp;Long</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN></FONT><SPAN style="COLOR: #000000"><FONT style="BACKGROUND-COLOR: #ffff33">&nbsp;companyTypeManager;<BR></FONT></SPAN><SPAN style="COLOR: #008080">&nbsp;4</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/InBlock.gif" align=top src_cetemp="/Images/OutliningIndicators/InBlock.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000">&nbsp;List&nbsp;companies;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;5</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/InBlock.gif" align=top src_cetemp="/Images/OutliningIndicators/InBlock.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000">&nbsp;Company&nbsp;company;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;6</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/InBlock.gif" align=top src_cetemp="/Images/OutliningIndicators/InBlock.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000">&nbsp;Long&nbsp;companyId;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;7</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/InBlock.gif" align=top src_cetemp="/Images/OutliningIndicators/InBlock.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;8</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_396_456_Open_Image onclick="this.style.display='none'; Codehighlighter1_396_456_Open_Text.style.display='none'; Codehighlighter1_396_456_Closed_Image.style.display='inline'; Codehighlighter1_396_456_Closed_Text.style.display='inline';" src="http://www.blogjava.net/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top src_cetemp="/Images/OutliningIndicators/ExpandedSubBlockStart.gif"><IMG id=Codehighlighter1_396_456_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_396_456_Closed_Text.style.display='none'; Codehighlighter1_396_456_Open_Image.style.display='inline'; Codehighlighter1_396_456_Open_Text.style.display='inline';" src="http://www.blogjava.net/Images/OutliningIndicators/ContractedSubBlock.gif" align=top src_cetemp="/Images/OutliningIndicators/ContractedSubBlock.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000">&nbsp;setCompanyManager(GenericManager</SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">Company,&nbsp;Long</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;companyManager)&nbsp;</SPAN><SPAN id=Codehighlighter1_396_456_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/Images/dot.gif" src_cetemp="http://www.blogjava.net/Images/dot.gif"></SPAN><SPAN id=Codehighlighter1_396_456_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;9</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/InBlock.gif" align=top src_cetemp="/Images/OutliningIndicators/InBlock.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">this</SPAN><SPAN style="COLOR: #000000">.companyManager&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;companyManager;<BR></SPAN><SPAN style="COLOR: #008080">10</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top src_cetemp="/Images/OutliningIndicators/ExpandedSubBlockEnd.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">11</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/InBlock.gif" align=top src_cetemp="/Images/OutliningIndicators/InBlock.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">12</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_563_631_Open_Image onclick="this.style.display='none'; Codehighlighter1_563_631_Open_Text.style.display='none'; Codehighlighter1_563_631_Closed_Image.style.display='inline'; Codehighlighter1_563_631_Closed_Text.style.display='inline';" src="http://www.blogjava.net/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top src_cetemp="/Images/OutliningIndicators/ExpandedSubBlockStart.gif"><IMG id=Codehighlighter1_563_631_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_563_631_Closed_Text.style.display='none'; Codehighlighter1_563_631_Open_Image.style.display='inline'; Codehighlighter1_563_631_Open_Text.style.display='inline';" src="http://www.blogjava.net/Images/OutliningIndicators/ContractedSubBlock.gif" align=top src_cetemp="/Images/OutliningIndicators/ContractedSubBlock.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><FONT style="BACKGROUND-COLOR: #ffff33"><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000">&nbsp;setCompanyTypeManager(GenericManager</SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">CompanyType,&nbsp;Long</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000">&nbsp;companyTypeManager)&nbsp;</SPAN><SPAN id=Codehighlighter1_563_631_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/Images/dot.gif" src_cetemp="http://www.blogjava.net/Images/dot.gif"></SPAN></FONT><SPAN id=Codehighlighter1_563_631_Open_Text><SPAN style="COLOR: #000000"><FONT style="BACKGROUND-COLOR: #ffff33">{<BR></FONT></SPAN><SPAN style="COLOR: #008080">13</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/InBlock.gif" align=top src_cetemp="/Images/OutliningIndicators/InBlock.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><FONT style="BACKGROUND-COLOR: #ffff33"><SPAN style="COLOR: #0000ff">this</SPAN><SPAN style="COLOR: #000000">.companyTypeManager&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN></FONT><SPAN style="COLOR: #000000"><FONT style="BACKGROUND-COLOR: #ffff33">&nbsp;companyTypeManager;<BR></FONT></SPAN><SPAN style="COLOR: #008080">14</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top src_cetemp="/Images/OutliningIndicators/ExpandedSubBlockEnd.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT style="BACKGROUND-COLOR: #ffff33">}</FONT></SPAN></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">15</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/InBlock.gif" align=top src_cetemp="/Images/OutliningIndicators/InBlock.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">16</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_681_721_Open_Image onclick="this.style.display='none'; Codehighlighter1_681_721_Open_Text.style.display='none'; Codehighlighter1_681_721_Closed_Image.style.display='inline'; Codehighlighter1_681_721_Closed_Text.style.display='inline';" src="http://www.blogjava.net/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top src_cetemp="/Images/OutliningIndicators/ExpandedSubBlockStart.gif"><IMG id=Codehighlighter1_681_721_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_681_721_Closed_Text.style.display='none'; Codehighlighter1_681_721_Open_Image.style.display='inline'; Codehighlighter1_681_721_Open_Text.style.display='inline';" src="http://www.blogjava.net/Images/OutliningIndicators/ContractedSubBlock.gif" align=top src_cetemp="/Images/OutliningIndicators/ContractedSubBlock.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;List&nbsp;getCompanies()&nbsp;</SPAN><SPAN id=Codehighlighter1_681_721_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/Images/dot.gif" src_cetemp="http://www.blogjava.net/Images/dot.gif"></SPAN><SPAN id=Codehighlighter1_681_721_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">17</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/InBlock.gif" align=top src_cetemp="/Images/OutliningIndicators/InBlock.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000">&nbsp;companies;<BR></SPAN><SPAN style="COLOR: #008080">18</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top src_cetemp="/Images/OutliningIndicators/ExpandedSubBlockEnd.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">19</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/InBlock.gif" align=top src_cetemp="/Images/OutliningIndicators/InBlock.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">20</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_773_831_Open_Image onclick="this.style.display='none'; Codehighlighter1_773_831_Open_Text.style.display='none'; Codehighlighter1_773_831_Closed_Image.style.display='inline'; Codehighlighter1_773_831_Closed_Text.style.display='inline';" src="http://www.blogjava.net/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top src_cetemp="/Images/OutliningIndicators/ExpandedSubBlockStart.gif"><IMG id=Codehighlighter1_773_831_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_773_831_Closed_Text.style.display='none'; Codehighlighter1_773_831_Open_Image.style.display='inline'; Codehighlighter1_773_831_Open_Text.style.display='inline';" src="http://www.blogjava.net/Images/OutliningIndicators/ContractedSubBlock.gif" align=top src_cetemp="/Images/OutliningIndicators/ContractedSubBlock.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><FONT style="BACKGROUND-COLOR: #ffff33"><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;List&nbsp;getCompanyTypeList()&nbsp;</SPAN><SPAN id=Codehighlighter1_773_831_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/Images/dot.gif" src_cetemp="http://www.blogjava.net/Images/dot.gif"></SPAN></FONT><SPAN id=Codehighlighter1_773_831_Open_Text><SPAN style="COLOR: #000000"><FONT style="BACKGROUND-COLOR: #ffff33">{<BR></FONT></SPAN><SPAN style="COLOR: #008080">21</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/InBlock.gif" align=top src_cetemp="/Images/OutliningIndicators/InBlock.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff"><FONT style="BACKGROUND-COLOR: #ffff33">return</FONT></SPAN><SPAN style="COLOR: #000000"><FONT style="BACKGROUND-COLOR: #ffff33">&nbsp;companyTypeManager.getAll();</FONT><BR></SPAN><SPAN style="COLOR: #008080">22</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top src_cetemp="/Images/OutliningIndicators/ExpandedSubBlockEnd.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT style="BACKGROUND-COLOR: #ffff33">}</FONT></SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">23</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/InBlock.gif" align=top src_cetemp="/Images/OutliningIndicators/InBlock.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">24</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/InBlock.gif" align=top src_cetemp="/Images/OutliningIndicators/InBlock.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<IMG src="http://www.blogjava.net/Images/dot.gif" src_cetemp="http://www.blogjava.net/Images/dot.gif"><IMG src="http://www.blogjava.net/Images/dot.gif" src_cetemp="http://www.blogjava.net/Images/dot.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">25</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/ExpandedBlockEnd.gif" align=top src_cetemp="/Images/OutliningIndicators/ExpandedBlockEnd.gif">&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN></DIV>&nbsp;&nbsp;&nbsp; 这样页面就可以显示对应的下拉列表了。<BR><BR>&nbsp;&nbsp;&nbsp; 5。CRUD中，当Update一对多一列时，会出现错误：<BR>
<DIV style="BORDER-RIGHT: rgb(204,204,204) 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: rgb(204,204,204) 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 12px; PADDING-BOTTOM: 4px; BORDER-LEFT: rgb(204,204,204) 1px solid; WIDTH: 98%; PADDING-TOP: 4px; BORDER-BOTTOM: rgb(204,204,204) 1px solid; BACKGROUND-COLOR: rgb(238,238,238)">&nbsp;&nbsp;&nbsp; identifier of an instance of com.reda.app.model.CompanyType was altered from 11 to 1; nested exception is org.hibernate.HibernateException: identifier of an instance of com.reda.app.model.CompanyType was altered from 11 to 1</DIV>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; 在网上找了找，错误的原因主要是因为Action在开始时，会持久化对象，在组装数据时，会用新数据替换旧数据，如果被替换的是持久化对象，在替换子对象关系时，会检查到子对象的Id被强制修改的错误，而持久化对象的Id值是不能被更改的。 <BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; debug时，发现在Update时，会调用prepare先持久化，注释调这部分，就可以了。<BR>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><SPAN style="COLOR: #008080">&nbsp;1</SPAN><IMG id=Codehighlighter1_4_97_Open_Image onclick="this.style.display='none'; Codehighlighter1_4_97_Open_Text.style.display='none'; Codehighlighter1_4_97_Closed_Image.style.display='inline'; Codehighlighter1_4_97_Closed_Text.style.display='inline';" src="http://www.blogjava.net/Images/OutliningIndicators/ExpandedBlockStart.gif" align=top src_cetemp="/Images/OutliningIndicators/ExpandedBlockStart.gif"><IMG id=Codehighlighter1_4_97_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_4_97_Closed_Text.style.display='none'; Codehighlighter1_4_97_Open_Image.style.display='inline'; Codehighlighter1_4_97_Open_Text.style.display='inline';" src="http://www.blogjava.net/Images/OutliningIndicators/ContractedBlock.gif" align=top src_cetemp="/Images/OutliningIndicators/ContractedBlock.gif"><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN id=Codehighlighter1_4_97_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**&nbsp;*/</SPAN><SPAN id=Codehighlighter1_4_97_Open_Text><SPAN style="COLOR: #008000">/**</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;2</SPAN><SPAN style="COLOR: #008000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/InBlock.gif" align=top src_cetemp="/Images/OutliningIndicators/InBlock.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Grab&nbsp;the&nbsp;entity&nbsp;from&nbsp;the&nbsp;database&nbsp;before&nbsp;populating&nbsp;with&nbsp;request&nbsp;parameters<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;3</SPAN><SPAN style="COLOR: #008000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/ExpandedBlockEnd.gif" align=top src_cetemp="/Images/OutliningIndicators/ExpandedBlockEnd.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">*/</SPAN></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;4</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_129_477_Open_Image onclick="this.style.display='none'; Codehighlighter1_129_477_Open_Text.style.display='none'; Codehighlighter1_129_477_Closed_Image.style.display='inline'; Codehighlighter1_129_477_Closed_Text.style.display='inline';" src="http://www.blogjava.net/Images/OutliningIndicators/ExpandedBlockStart.gif" align=top src_cetemp="/Images/OutliningIndicators/ExpandedBlockStart.gif"><IMG id=Codehighlighter1_129_477_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_129_477_Closed_Text.style.display='none'; Codehighlighter1_129_477_Open_Image.style.display='inline'; Codehighlighter1_129_477_Open_Text.style.display='inline';" src="http://www.blogjava.net/Images/OutliningIndicators/ContractedBlock.gif" align=top src_cetemp="/Images/OutliningIndicators/ContractedBlock.gif">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000">&nbsp;prepare()&nbsp;</SPAN><SPAN id=Codehighlighter1_129_477_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/Images/dot.gif" src_cetemp="http://www.blogjava.net/Images/dot.gif"></SPAN><SPAN id=Codehighlighter1_129_477_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;5</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_194_471_Open_Image onclick="this.style.display='none'; Codehighlighter1_194_471_Open_Text.style.display='none'; Codehighlighter1_194_471_Closed_Image.style.display='inline'; Codehighlighter1_194_471_Closed_Text.style.display='inline';" src="http://www.blogjava.net/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top src_cetemp="/Images/OutliningIndicators/ExpandedSubBlockStart.gif"><IMG id=Codehighlighter1_194_471_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_194_471_Closed_Text.style.display='none'; Codehighlighter1_194_471_Open_Image.style.display='inline'; Codehighlighter1_194_471_Open_Text.style.display='inline';" src="http://www.blogjava.net/Images/OutliningIndicators/ContractedSubBlock.gif" align=top src_cetemp="/Images/OutliningIndicators/ContractedSubBlock.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">&nbsp;(getRequest().getMethod().equalsIgnoreCase(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">post</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">))&nbsp;</SPAN><SPAN id=Codehighlighter1_194_471_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/Images/dot.gif" src_cetemp="http://www.blogjava.net/Images/dot.gif"></SPAN><SPAN id=Codehighlighter1_194_471_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;6</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/InBlock.gif" align=top src_cetemp="/Images/OutliningIndicators/InBlock.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;prevent&nbsp;failures&nbsp;on&nbsp;new</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;7</SPAN><SPAN style="COLOR: #008000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/InBlock.gif" align=top src_cetemp="/Images/OutliningIndicators/InBlock.gif"></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String&nbsp;companyId&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;getRequest().getParameter(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">company.companyId</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;8</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/InBlock.gif" align=top src_cetemp="/Images/OutliningIndicators/InBlock.gif"></SPAN><SPAN style="COLOR: #008000"><FONT style="BACKGROUND-COLOR: #ffff33">//</FONT></SPAN><SPAN style="COLOR: #008000"><FONT style="BACKGROUND-COLOR: #ffff33">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(companyId&nbsp;!=&nbsp;null&nbsp;&amp;&amp;&nbsp;!companyId.equals(""))&nbsp;{<BR></FONT></SPAN><SPAN style="COLOR: #008080">&nbsp;9</SPAN><SPAN style="COLOR: #008000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/InBlock.gif" align=top src_cetemp="/Images/OutliningIndicators/InBlock.gif"></SPAN><SPAN style="COLOR: #008000"><FONT style="BACKGROUND-COLOR: #ffff33">//</FONT></SPAN><SPAN style="COLOR: #008000"><FONT style="BACKGROUND-COLOR: #ffff33">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;company&nbsp;=&nbsp;companyManager.get(new&nbsp;Long(companyId));<BR></FONT></SPAN><SPAN style="COLOR: #008080">10</SPAN><SPAN style="COLOR: #008000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/InBlock.gif" align=top src_cetemp="/Images/OutliningIndicators/InBlock.gif"></SPAN><FONT style="BACKGROUND-COLOR: #ffff33"><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></FONT><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">11</SPAN><SPAN style="COLOR: #008000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top src_cetemp="/Images/OutliningIndicators/ExpandedSubBlockEnd.gif"></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">12</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/Images/OutliningIndicators/ExpandedBlockEnd.gif" align=top src_cetemp="/Images/OutliningIndicators/ExpandedBlockEnd.gif">&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN></DIV><br>文章来源:<a href='
http://heyday.blogcn.com/diary,15301923.shtml'>
http://heyday.blogcn.com/diary,15301923.shtml</a><img src ="http://www.blogjava.net/heyday/aggbug/198256.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/heyday/" target="_blank">不同樊响</a> 2008-05-04 20:57 <a href="http://www.blogjava.net/heyday/archive/2008/05/04/198256.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[导入][AppFuse] AppFuse使用手记－－DAO（七） [原]</title><link>http://www.blogjava.net/heyday/archive/2008/05/04/198255.html</link><dc:creator>不同樊响</dc:creator><author>不同樊响</author><pubDate>Sun, 04 May 2008 12:57:00 GMT</pubDate><guid>http://www.blogjava.net/heyday/archive/2008/05/04/198255.html</guid><wfw:comment>http://www.blogjava.net/heyday/comments/198255.html</wfw:comment><comments>http://www.blogjava.net/heyday/archive/2008/05/04/198255.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/heyday/comments/commentRss/198255.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/heyday/services/trackbacks/198255.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: &nbsp;&nbsp;&nbsp; AppFuse生成的Action的提供了几个基本的CRUD方法。先看一下这几个方法的实现。&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Actioni通过Spring注入GenericManager，而GenericManager的实现GenericManagerImpl则...&nbsp;&nbsp;<a href='http://www.blogjava.net/heyday/archive/2008/05/04/198255.html'>阅读全文</a><img src ="http://www.blogjava.net/heyday/aggbug/198255.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/heyday/" target="_blank">不同樊响</a> 2008-05-04 20:57 <a href="http://www.blogjava.net/heyday/archive/2008/05/04/198255.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[导入][AppFuse] AppFuse使用手记－－Validator（八） [原]</title><link>http://www.blogjava.net/heyday/archive/2008/05/04/198254.html</link><dc:creator>不同樊响</dc:creator><author>不同樊响</author><pubDate>Sun, 04 May 2008 12:57:00 GMT</pubDate><guid>http://www.blogjava.net/heyday/archive/2008/05/04/198254.html</guid><wfw:comment>http://www.blogjava.net/heyday/comments/198254.html</wfw:comment><comments>http://www.blogjava.net/heyday/archive/2008/05/04/198254.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/heyday/comments/commentRss/198254.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/heyday/services/trackbacks/198254.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp; 上篇中例子还有一个小小的问题。因为所有的Action配置都指向同一个Action类。而AppFuse会对没敢Action生成一个Validator的xml文件。而当同一个Action里包含很多操作，而这些操作对同一个POJO效验又不一样时，就会出现问题。比较常见的时，一个POJO Create和Update时对某个field效验不能为空，而POJO做为查询条件时这个field却允许为空。这样生成的Validator配置就不能同时运用于这一个Action。<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; 而Validator的配置文件为ActionName-validation.xml，即每个xml对应于一个Action。所以需要我们把不同的操作放到不同的Action里，在配置不同的xml验规则。这样有一个问题，就是可能引起Action的类爆炸，而且不同的Action里可能会有很多相同的代码。我但是想能不能用Action的extends来避免这个问题。后来发现Action的extends是可以规避类爆炸的问题，可是效验还是会出现向前的问题，原因是因为“WebWork搜索活动类的继承树寻找父类或接口的校验规则”。就是说，验框架按照自上而下的顺序在类层次查找配置文件。<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; 还有一种解决的方法，就是自己写一个Validator，可以参考结合<A class=diary_url href="http://afareg.blogdriver.com/afareg/641282.html" target=_blank>验证在struts中减少Action和ActionForm的数量</A>。<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; 我建议WebWork可以考虑在Validator的效验规则里象struts.xml的Action标签一样增加method参数。可以根据不同的method定义不同的效验规则。 <br>文章来源:<a href='
http://heyday.blogcn.com/diary,15423464.shtml'>
http://heyday.blogcn.com/diary,15423464.shtml</a><img src ="http://www.blogjava.net/heyday/aggbug/198254.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/heyday/" target="_blank">不同樊响</a> 2008-05-04 20:57 <a href="http://www.blogjava.net/heyday/archive/2008/05/04/198254.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[导入][AppFuse] AppFuse使用手记－－Display Tag 分页（九） [原]</title><link>http://www.blogjava.net/heyday/archive/2008/05/04/198253.html</link><dc:creator>不同樊响</dc:creator><author>不同樊响</author><pubDate>Sun, 04 May 2008 12:57:00 GMT</pubDate><guid>http://www.blogjava.net/heyday/archive/2008/05/04/198253.html</guid><wfw:comment>http://www.blogjava.net/heyday/comments/198253.html</wfw:comment><comments>http://www.blogjava.net/heyday/archive/2008/05/04/198253.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/heyday/comments/commentRss/198253.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/heyday/services/trackbacks/198253.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: &nbsp;&nbsp;&nbsp; AppFuse使用Display Tag做为内容显示。Display Tag的分页默认是按全量数据自动进行分页。如果数据量大的话，就很耗费性能。&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 可以参考External Paging and Sorting。&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 如...&nbsp;&nbsp;<a href='http://www.blogjava.net/heyday/archive/2008/05/04/198253.html'>阅读全文</a><img src ="http://www.blogjava.net/heyday/aggbug/198253.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/heyday/" target="_blank">不同樊响</a> 2008-05-04 20:57 <a href="http://www.blogjava.net/heyday/archive/2008/05/04/198253.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>