﻿<?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-TransientLove-文章分类-Liferay 研究</title><link>http://www.blogjava.net/TransientLove/category/16626.html</link><description>Java Fan</description><language>zh-cn</language><lastBuildDate>Sun, 01 Apr 2007 15:43:08 GMT</lastBuildDate><pubDate>Sun, 01 Apr 2007 15:43:08 GMT</pubDate><ttl>60</ttl><item><title>Liferay “瘦身”笔记</title><link>http://www.blogjava.net/TransientLove/articles/77468.html</link><dc:creator>TransientLove</dc:creator><author>TransientLove</author><pubDate>Thu, 26 Oct 2006 12:40:00 GMT</pubDate><guid>http://www.blogjava.net/TransientLove/articles/77468.html</guid><wfw:comment>http://www.blogjava.net/TransientLove/comments/77468.html</wfw:comment><comments>http://www.blogjava.net/TransientLove/articles/77468.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/TransientLove/comments/commentRss/77468.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/TransientLove/services/trackbacks/77468.html</trackback:ping><description><![CDATA[
		<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 168pt; TEXT-INDENT: 21pt">
						<span lang="EN-US">
								<font face="Times New Roman">Liferay </font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">“瘦身”笔记</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 168pt; TEXT-INDENT: 21pt">
						<span lang="EN-US">
								<font face="Times New Roman">
										<span style="mso-tab-count: 2">              </span>---------TransientLove<span style="mso-spacerun: yes">  </span><?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /?><st1:chsdate w:st="on" year="2006" month="10" day="26" islunardate="False" isrocdate="False">2006-10-26</st1:chsdate></font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
						<span lang="EN-US">
								<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /?>
								<o:p>
										<font face="Times New Roman"> </font>
								</o:p>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt">
						<span lang="EN-US" style="mso-bidi-font-family: 宋体">
								<span style="mso-list: Ignore">
										<font face="Times New Roman">一、</font>
								</span>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">概述</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt">
						<span lang="EN-US">
								<font face="Times New Roman">Liferay</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">本身提供了很多</span>
						<span lang="EN-US">
								<font face="Times New Roman">portlet</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，但对我们的项目或产品绝大部分不适合。在我们开发中，我们希望用最简洁的</span>
						<span lang="EN-US">
								<font face="Times New Roman">Liferay</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">开发出适合我们产品。这样做的好处是，对</span>
						<span lang="EN-US">
								<font face="Times New Roman">Liferay</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">代码有更深入的了解，包括其编译过程，核心代码等都有足够的了解，知己知彼，方能百战百胜嘛。</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt">
						<span lang="EN-US">
								<font face="Times New Roman">Liferay</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">官方网站提供了很多教程，包括用户指南，开发指南，</span>
						<span lang="EN-US">
								<font face="Times New Roman">Lifecast</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">等，对如何给</span>
						<span lang="EN-US">
								<font face="Times New Roman">Liferay</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">“瘦身”并没有相关的教程。现在我们自己手工给</span>
						<span lang="EN-US">
								<font face="Times New Roman">Liferay</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">“瘦身”。</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt">
						<span lang="EN-US" style="mso-bidi-font-family: 宋体">
								<span style="mso-list: Ignore">
										<font face="Times New Roman">二、</font>
								</span>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">“瘦身”过程</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 39pt; TEXT-INDENT: -18pt; mso-list: l1 level1 lfo2; tab-stops: list 39.0pt">
						<span lang="EN-US" style="mso-fareast-font-family: 'Times New Roman'">
								<span style="mso-list: Ignore">
										<font face="Times New Roman">1．<span style="FONT: 7pt 'Times New Roman'"><font size="3">  </font></span></font>
								</span>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">运行</span>
						<span lang="EN-US">
								<font face="Times New Roman">Liferay</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">后，选择不需要的</span>
						<span lang="EN-US">
								<font face="Times New Roman">Portlet</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 39pt; TEXT-INDENT: -18pt; mso-list: l1 level1 lfo2; tab-stops: list 39.0pt">
						<span lang="EN-US" style="mso-fareast-font-family: 'Times New Roman'">
								<span style="mso-list: Ignore">
										<font face="Times New Roman">2．<span style="FONT: 7pt 'Times New Roman'"><font size="3">  </font></span></font>
								</span>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">从</span>
						<span lang="EN-US" style="COLOR: red">
								<font face="Times New Roman">portal-ejb\src\com\liferay\portlet</font>
						</span>
						<span style="COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</span>
						<span lang="EN-US" style="COLOR: red">
								<font face="Times New Roman">portal-web\docroot\html\portlet</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中删除。</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 39pt; TEXT-INDENT: -18pt; mso-list: l1 level1 lfo2; tab-stops: list 39.0pt">
						<span lang="EN-US" style="mso-fareast-font-family: 'Times New Roman'">
								<span style="mso-list: Ignore">
										<font face="Times New Roman">3．<span style="FONT: 7pt 'Times New Roman'"><font size="3">  </font></span></font>
								</span>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">修改</span>
						<span lang="EN-US" style="COLOR: red">
								<font face="Times New Roman">portal-web\docroot\WEB-INF</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">目录下的</span>
						<span lang="EN-US">
								<font face="Times New Roman">liferay-display.xml</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</span>
						<span lang="EN-US">
								<font face="Times New Roman">liferay-portlet.xml</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</span>
						<span lang="EN-US">
								<font face="Times New Roman">portlet.xml</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，相应的在其目录下还有</span>
						<span lang="EN-US">
								<font face="Times New Roman">web.xml,struts-config.xml,tiles-def.xml</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">等。注意：有几个</span>
						<span lang="EN-US">
								<font face="Times New Roman">Portlet</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">不能删除，</span>
						<span lang="EN-US">
								<font face="Times New Roman">words</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</span>
						<span lang="EN-US">
								<font face="Times New Roman">Translator</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">（在第三条我将解释为什么不能删除）。</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 39pt; TEXT-INDENT: -18pt; mso-list: l1 level1 lfo2; tab-stops: list 39.0pt">
						<span lang="EN-US" style="mso-fareast-font-family: 'Times New Roman'">
								<span style="mso-list: Ignore">
										<font face="Times New Roman">4．<span style="FONT: 7pt 'Times New Roman'"><font size="3">  </font></span></font>
								</span>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">修改</span>
						<span lang="EN-US" style="COLOR: red">
								<font face="Times New Roman">Portal-ejb\classes</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">下的</span>
						<span lang="EN-US">
								<font face="Times New Roman">System.properties,portal.properties</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">文件。如果想编译成中文，修改</span>
						<span lang="EN-US">
								<font face="Times New Roman">System.properties</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">下</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt">
						<span lang="EN-US">
								<font face="Times New Roman">user.country=CN</font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
						<span lang="EN-US">
								<font face="Times New Roman">
										<span style="mso-spacerun: yes">    </span>
										<span style="mso-tab-count: 1">       </span>user.language=zh</font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: 21pt">
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">这样在任何用户登录的时候就可以显示中文了。当然，也可在容器启动的时候设置语言环境。</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 39pt; TEXT-INDENT: -18pt; mso-list: l1 level1 lfo2; tab-stops: list 39.0pt">
						<span lang="EN-US" style="mso-fareast-font-family: 'Times New Roman'">
								<span style="mso-list: Ignore">
										<font face="Times New Roman">5．<span style="FONT: 7pt 'Times New Roman'"><font size="3">  </font></span></font>
								</span>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">修改</span>
						<span lang="EN-US" style="COLOR: red">
								<font face="Times New Roman">portal-ejb\classes\ META-INF</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">目录下所有与自己的</span>
						<span lang="EN-US">
								<font face="Times New Roman">portlet</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">相关的文件。（在的实验中，绝大部分文件都涉及到了）</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 39pt; TEXT-INDENT: -18pt; mso-list: l1 level1 lfo2; tab-stops: list 39.0pt">
						<span lang="EN-US" style="mso-fareast-font-family: 'Times New Roman'">
								<span style="mso-list: Ignore">
										<font face="Times New Roman">6．<span style="FONT: 7pt 'Times New Roman'"><font size="3">  </font></span></font>
								</span>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">同样的，</span>
						<span lang="EN-US">
								<font face="Times New Roman">custom-sql</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</span>
						<span lang="EN-US">
								<font face="Times New Roman">resource-actions</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">目录也是如此。</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 39pt; TEXT-INDENT: -18pt; mso-list: l1 level1 lfo2; tab-stops: list 39.0pt">
						<span lang="EN-US" style="mso-fareast-font-family: 'Times New Roman'">
								<span style="mso-list: Ignore">
										<font face="Times New Roman">7．<span style="FONT: 7pt 'Times New Roman'"><font size="3">  </font></span></font>
								</span>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">修改相应的</span>
						<span lang="EN-US">
								<font face="Times New Roman">build.xml</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">文件，否则编译不通过。</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 39pt; TEXT-INDENT: -18pt; mso-list: l1 level1 lfo2; tab-stops: list 39.0pt">
						<span lang="EN-US" style="mso-fareast-font-family: 'Times New Roman'">
								<span style="mso-list: Ignore">
										<font face="Times New Roman">8．<span style="FONT: 7pt 'Times New Roman'"><font size="3">  </font></span></font>
								</span>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">完成后在</span>
						<span lang="EN-US">
								<font face="Times New Roman">eclipse</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中打开此项目，修改错误。</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: 21pt">
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">以上过程不必严格按照步骤。“瘦身”并不是很难的事情，主要是耐心加细心便可以。</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt">
						<font face="Times New Roman">
								<span lang="EN-US" style="mso-bidi-font-family: 宋体">
										<span style="mso-list: Ignore">三、</span>
								</span>
								<span lang="EN-US">Language.properties</span>
						</font>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt">
						<span lang="EN-US">
								<font face="Times New Roman">Language.properties</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">文件内容是在开发的时候手工写入的，在</span>
						<span lang="EN-US">
								<font face="Times New Roman">portal-ejb</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">目录下的</span>
						<span lang="EN-US">
								<font face="Times New Roman">build.xml</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">文件有</span>
						<span lang="EN-US">
								<font face="Times New Roman">build-lang</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">任务用</span>
						<span lang="EN-US" style="COLOR: black">
								<font face="Times New Roman">com.liferay.portal.tools.LangBuilder</font>
						</span>
						<span style="COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">类，</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">他的功能是把</span>
						<span lang="EN-US">
								<font face="Times New Roman">build-lang-native2ascii-all</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">任务提供的参数生成相应的<span style="COLOR: black">生成语言文件</span>，比如中国汉字是</span>
						<span lang="EN-US">
								<font face="Times New Roman">Language_zh_CN.properties.native</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，它是如何生成的呢？</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt">
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在</span>
						<span lang="EN-US">
								<font face="Times New Roman">LangBuilder</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">类中调用</span>
						<span lang="EN-US">
								<font face="Times New Roman">TranslationConverter</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">类，而此类是</span>
						<span lang="EN-US">
								<font face="Times New Roman">Translater portlet</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">提供的，这就是开始为什么不建议删除此</span>
						<span lang="EN-US">
								<font face="Times New Roman">portlet</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的原因了。此类有以下代码</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 63pt; TEXT-INDENT: 21pt">
						<span lang="EN-US">
								<font face="Times New Roman">StringBuffer url = new StringBuffer();</font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt">
						<span lang="EN-US">
								<font face="Times New Roman">
										<span style="mso-tab-count: 3">                     </span>url.append("http://babelfish.altavista.com/babelfish/tr?doit=done");</font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt">
						<span lang="EN-US">
								<font face="Times New Roman">
										<span style="mso-tab-count: 3">                     </span>url.append("&amp;urltext=").append(Http.encodeURL(_fromText));</font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt">
						<span lang="EN-US">
								<font face="Times New Roman">
										<span style="mso-tab-count: 3">                     </span>url.append("&amp;lp=").append(_translationId);</font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt">
						<span lang="EN-US">
								<o:p>
										<font face="Times New Roman"> </font>
								</o:p>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 63pt; TEXT-INDENT: 21pt">
						<span lang="EN-US">
								<font face="Times New Roman">String text = Http.URLtoString(new URL(url.toString()));</font>
						</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
						<span lang="EN-US">
								<span style="mso-spacerun: yes">
										<font face="Times New Roman">     </font>
								</span>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">从上可以知道</span>
						<span lang="EN-US">
								<font face="Times New Roman">Liferay</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的翻译成中文时是如此之滥的原因了</span>
						<span lang="EN-US">
								<font face="Times New Roman">^_^</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。如果还不明白，建议仔细研究一下这两个类。</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt">
						<font face="Times New Roman">
								<span lang="EN-US" style="mso-bidi-font-family: 宋体">
										<span style="mso-list: Ignore">四、</span>
								</span>
								<span lang="EN-US">Sql</span>
						</font>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt">
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">与</span>
						<span lang="EN-US">
								<font face="Times New Roman">Language</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">相似，在</span>
						<span lang="EN-US">
								<font face="Times New Roman">sql</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">目录下的</span>
						<span lang="EN-US">
								<font face="Times New Roman">build.xml</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中同样提供了生成</span>
						<span lang="EN-US">
								<font face="Times New Roman">sql</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的任务是</span>
						<span lang="EN-US">
								<font face="Times New Roman">build-db</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。同样提供了一个类</span>
						<span lang="EN-US">
								<font face="Times New Roman">com.liferay.portal.tools.DBBuilder</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，如果对</span>
						<span lang="EN-US">
								<font face="Times New Roman">liferay</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">提供的数据不满意的话，可以参考这个类，修改相应的文件，产生适合自己的测试数据。</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt">
						<span lang="EN-US" style="mso-bidi-font-family: 宋体">
								<span style="mso-list: Ignore">
										<font face="Times New Roman">五、</font>
								</span>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">后记</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: 21pt">
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">第三和第四都是关于文件生成的，与“瘦身”关系不是太大，以后将介绍如何进行权限开发以及如何利用</span>
						<span lang="EN-US">
								<font face="Times New Roman">service.xml</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">文件生成代码的。</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: 21pt">
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">本以为</span>
						<span lang="EN-US">
								<font face="Times New Roman">Liferay</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">瘦身是件很简单，很容易的事情，但是经过了这么长时间的“瘦身”，才知道自己原先的想法是多么的可笑，同时对</span>
						<span lang="EN-US">
								<font face="Times New Roman">Liferay</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的了解更进了一步。在此奉劝各位亲自动手给</span>
						<span lang="EN-US">
								<font face="Times New Roman">Liferay</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">“瘦身”，来体会“瘦身”的乐趣。</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: 21pt">
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">通过“瘦身”，你对</span>
						<span lang="EN-US">
								<font face="Times New Roman">Liferay</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">了解了多少？</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt">
						<span lang="EN-US" style="mso-bidi-font-family: 宋体">
								<span style="mso-list: Ignore">
										<font face="Times New Roman">六、</font>
								</span>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">参考资料</span>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 18pt">
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">银狐</span>
						<span lang="EN-US">
								<font face="Times New Roman">999</font>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">：</span>
						<strong>
								<span lang="EN-US" style="COLOR: #333333">
										<font face="Times New Roman">Liferay</font>
								</span>
						</strong>
						<strong>
								<span style="COLOR: #333333; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">额外研究（二）：对</span>
								<span lang="EN-US" style="COLOR: #333333">
										<font face="Times New Roman">Liferay</font>
								</span>
						</strong>
						<strong>
								<span style="COLOR: #333333; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">进行瘦身</span>
								<span lang="EN-US" style="COLOR: #333333">
										<o:p>
										</o:p>
								</span>
						</strong>
				</p>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 18pt">
						<span lang="EN-US">
								<a href="http://blog.csdn.net/james999/archive/2006/07/27/986386.aspx">
										<font face="Times New Roman">http://blog.csdn.net/james999/archive/2006/07/27/986386.aspx</font>
								</a>
						</span>
				</p>
				<p>
				</p>
		</span> <img src ="http://www.blogjava.net/TransientLove/aggbug/77468.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/TransientLove/" target="_blank">TransientLove</a> 2006-10-26 20:40 <a href="http://www.blogjava.net/TransientLove/articles/77468.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>