<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "关于开发环境搭建"]]></title>
		<link>https://forum.andowson.com/posts/list/7.page</link>
		<description><![CDATA[Latest messages posted in the topic "关于开发环境搭建"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>关于开发环境搭建</title>
				<description><![CDATA[ 我使用在google code 上面的项目源码(trunk)，SVN CO 下来后，尝试用eclipse 来搭建开发环境，tomcat , maven，freemarker插件都已经安装好。 
<br>
然后import --&gt;maven--&gt; existing maven projects. 编译结果提示很多错误，比如模版文件中语法报错，xml文件中的freemarker 标签提示语法错误等。 
<br>
<br>
我的系统环境是： windows-xp sp3 + tomcat-6.0 + JDK6.0 + Eclispe-3.6 + 插件若干 + mysql-5.1 
<br>
能介绍一下如何建立开发环境的步骤吗？]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1071.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1071.page</link>
				<pubDate><![CDATA[Fri, 1 Jul 2011 14:42:18]]> GMT</pubDate>
				<author><![CDATA[ 十鼎]]></author>
			</item>
			<item>
				<title>回覆:关于开发环境搭建</title>
				<description><![CDATA[ 您所提到的這兩項都算是正常: 
<br>
模版檔中語法報錯，xml檔中的freemarker 標籤提示語法錯誤 
<br>
<br>
我的開發環境如下: 
<br>
Windows 7 + [url=http://www.oracle.com/technetwork/java/javase/downloads/index.html]Java SE 6 Update 26[/url] + [url=http://tomcat.apache.org/]Tomcat 7.0.14[/url] + [url=http://dev.mysql.com/downloads/mysql/]MySQL Community Server 5.5.13[/url] 
<br>
[url=http://www.eclipse.org/downloads/]Eclipse IDE for Java EE Developers Helios Sr2 [/url] + [url=http://maven.apache.org/docs/3.0.3/release-notes.html]Maven 3.0.3[/url] + 
<br>
Eclipse Plugins: [url=http://subclipse.tigris.org/]Subclipse[/url], [url=http://sourceforge.net/projects/eclipse-rbe/]Eclipse ResourceBundle Editor[/url], [url=http://m2eclipse.sonatype.org/installing-m2eclipse.html]M2Eclipse[/url], [url=http://findbugs.sourceforge.net/downloads.html]FindBugs[/url] 
<br>
<br>
安裝路徑 
<br>
C:\apache-maven-3.0.3 
<br>
C:\apache-tomcat-7.0.14 
<br>
C:\eclipse 
<br>
C:\Program Files\Java\jdk1.6.0_26 
<br>
C:\Program Files\MySQL\MySQL Server 5.5 
<br>
<br>
1.安裝完成MySQL後，root帳號之密碼請設定為root，先建立一個資料庫名為jforum，同時建立一個使用者也是jforum，密碼可任意設定。 
<br>
2.將jforum.war放到Tomcat 之webapps目錄下，啟動Tomcat後，開啟瀏覽器瀏覽http://localhost:8080/jforum/ 
<br>
3.依照畫面提示，選擇使用MySQL作為資料庫完成JForum安裝。 
<br>
<br>
接下來，開啟Eclipse，設定Preferences-&gt;Installed JREs，刪除jre6，然後按下Add，選擇Standard VM，按下Next，在JRE Home: 後面的Directory...選擇C:\Program Files\Java\jdk1.6.0_26，按下Finish 
<br>
點開Installed JREs下面的Execution Environments，點選J2SE-1.5，勾選jdk1.6.0_26 
<br>
<br>
透過File &gt; Import ...&gt; SVN &gt; 自SVN取回專案 
<br>
將原始碼trunk由http://jforum2.googlecode.com/svn/trunk/取回 
<br>
然後先Maven &gt; Enable Dependency Management，再Update Dependencies 
<br>
接著執行Run As &gt; Maven package 
<br>
這樣子就可以建立岀新的jforum.war了]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1072.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1072.page</link>
				<pubDate><![CDATA[Fri, 1 Jul 2011 17:37:52]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
			<item>
				<title>回复:关于开发环境搭建</title>
				<description><![CDATA[ 谢过了！我再研究下。 
<br>
我也是和你一样将验证码关掉大小写，输入的时候就不容易看错了。呵呵。]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1073.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1073.page</link>
				<pubDate><![CDATA[Fri, 1 Jul 2011 19:10:37]]> GMT</pubDate>
				<author><![CDATA[ 十鼎]]></author>
			</item>
			<item>
				<title>回复:关于开发环境搭建</title>
				<description><![CDATA[ 问下你的maven setting 文件是怎么设置的？]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1074.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1074.page</link>
				<pubDate><![CDATA[Sat, 2 Jul 2011 09:19:52]]> GMT</pubDate>
				<author><![CDATA[ 十鼎]]></author>
			</item>
			<item>
				<title>回覆:关于开发环境搭建</title>
				<description><![CDATA[ 我沒修改過maven settings.xml的內容 
<br>
<br>
補充說明： 
<br>
有關Oracle JDBC Driver部分必須自行由[url=http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html]Oracle.com[/url]網站下載，更名為ojdbc14-10.2.0.4.0.jar，然後放置到 
<br>
C:\Users\Andowson\.m2\repository\com\oracle\ojdbc14\10.2.0.4.0目錄下 
<br>
<br>
參考資料： 
<br>
http://www.mkyong.com/maven/how-to-add-oracle-jdbc-driver-in-your-maven-local-repository/]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1075.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1075.page</link>
				<pubDate><![CDATA[Sat, 2 Jul 2011 10:30:53]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
			<item>
				<title>回复:关于开发环境搭建</title>
				<description><![CDATA[ andowson, 按照你的提示，我编译的结果有错误，信息如下： 
<br>
Tests in error: 
<br>
 testSimple(net.jforum.api.integration.mail.pop.POPListenerTestCase): Error while trying to start ForumRepository: net.jforum.exceptions.DatabaseException: java.sql.SQLException: An attempt by a client to checkout a Connection has timed out. 
<br>
 testInReplyToIncorrectShouldCreateNewTopic(net.jforum.api.integration.mail.pop.POPListenerTestCase): Error while trying to start ForumRepository: net.jforum.exceptions.DatabaseException: java.sql.SQLException: An attempt by a client to checkout a Connection has timed out. 
<br>
 testInReplyToCreateNewTopicThenReply(net.jforum.api.integration.mail.pop.POPListenerTestCase): Error while trying to start ForumRepository: net.jforum.exceptions.DatabaseException: java.sql.SQLException: An attempt by a client to checkout a Connection has timed out. 
<br>
 testInvalid(net.jforum.api.integration.rest.RESTAuthenticationTestCase): java.sql.SQLException: An attempt by a client to checkout a Connection has timed out. 
<br>
 testValid(net.jforum.api.integration.rest.RESTAuthenticationTestCase): java.sql.SQLException: An attempt by a client to checkout a Connection has timed out. 
<br>
 testLoadRecipients(net.jforum.summary.SummaryTest): java.sql.SQLException: An attempt by a client to checkout a Connection has timed out. 
<br>
 testSendMails(net.jforum.summary.SummaryTest): java.sql.SQLException: An attempt by a client to checkout a Connection has timed out. 
<br>
 testListPosts(net.jforum.summary.SummaryTest): java.sql.SQLException: An attempt by a client to checkout a Connection has timed out. 
<br>
<br>
8个错误都是一个原因，其实就是运行测试用例时，无法对SQL数据库建立连接。 
<br>
请问这些测试用例中用到的数据库账号密码在哪里设置？ 
<br>
<br>
谢谢。]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1076.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1076.page</link>
				<pubDate><![CDATA[Sat, 2 Jul 2011 22:23:30]]> GMT</pubDate>
				<author><![CDATA[ 十鼎]]></author>
			</item>
			<item>
				<title>回覆:关于开发环境搭建</title>
				<description><![CDATA[ 請參考src/main/config/database/mysql/mysql.properties的內容 
<br>
安裝MySQL Server的時候root的密碼要設定為root，如果不是的話，就要修改mysql.properties中的內容， 
<br>
另外測試時網際網路必須是連線的狀態，才能測試發信的功能。]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1077.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1077.page</link>
				<pubDate><![CDATA[Sun, 3 Jul 2011 01:42:41]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
			<item>
				<title>回复:关于开发环境搭建</title>
				<description><![CDATA[ testSimple(net.jforum.api.integration.mail.pop.POPListenerTestCase): There should be exactly one post 
<br>
 testInReplyToIncorrectShouldCreateNewTopic(net.jforum.api.integration.mail.pop.POPListenerTestCase): There should be exactly one post 
<br>
 testInReplyToCreateNewTopicThenReply(net.jforum.api.integration.mail.pop.POPListenerTestCase): There should be exactly one post 
<br>
<br>
数据库的错误没有的。只剩下邮件相关的几个测试有问题。在测试用例的源码文件中，我已经将邮件服务器和邮件账号相关的字符串都修改为合适的值了。包括：MAIL_SMTP_HOST，MAIL_SMTP_PORT，MAIL_SMTP_USERNAME，MAIL_SMTP_PASSWORD，popHost等。出现以上错误提示。 
<br>]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1078.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1078.page</link>
				<pubDate><![CDATA[Sun, 3 Jul 2011 16:55:06]]> GMT</pubDate>
				<author><![CDATA[ 十鼎]]></author>
			</item>
			<item>
				<title>回覆:关于开发环境搭建</title>
				<description><![CDATA[ 請執行一下 
<br>
[code]mysql -u root -p 
<br>
mysql&gt; use jforum; 
<br>
mysql&gt; source D:\workspace\jforum2_googlecode\src\main\config\database\mysql\mysql_db_struct.sql 
<br>
mysql&gt; source D:\workspace\jforum2_googlecode\src\main\config\database\mysql\mysql_data_dump.sql[/code] 
<br>
D:\workspace\jforum2_googlecode請替換為您Eclipse的workspace工作目錄。]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1079.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1079.page</link>
				<pubDate><![CDATA[Mon, 4 Jul 2011 08:18:15]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
			<item>
				<title>回复:关于开发环境搭建</title>
				<description><![CDATA[ 谢谢andowson! 
<br>
根据你上面的提示，我终于能构造一个jforum.war包了。 
<br>
<br>
我将上面的部署包部署到web服务器。初步测试发现一个问题：回复的内容显示不出来，在管理后台“清除”文章缓存后，或者重启web服务器，都可以正常显示对一个主题的回复内容。参考附件中是两个抓图。 
<br>
<br>
我直接下载你的jforum.war包，部署安装，没有出现这个问题！ 
<br>
<br>]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1082.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1082.page</link>
				<pubDate><![CDATA[Mon, 4 Jul 2011 21:33:25]]> GMT</pubDate>
				<author><![CDATA[ 十鼎]]></author>
			</item>
			<item>
				<title>回复:关于开发环境搭建</title>
				<description><![CDATA[ 补充描述下回复不正常显示的页面：只见回复的标题栏，不见回复内容，已经底部导航栏和页脚的内容。 
<br>
见附件的抓图； 
<br>]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1083.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1083.page</link>
				<pubDate><![CDATA[Tue, 5 Jul 2011 00:02:33]]> GMT</pubDate>
				<author><![CDATA[ 十鼎]]></author>
			</item>
			<item>
				<title>回覆:关于开发环境搭建</title>
				<description><![CDATA[ 6/30發佈的r73版本有這個問題，我7/1已經修正並重新發佈了。 
<br>
請更新一下程式碼至SVN的[url=http://code.google.com/p/jforum2/source/detail?r=74]r74[/url] 
<br>
修正/trunk/src/main/java/net/jforum/view/forum/PostAction.java即可。]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1084.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1084.page</link>
				<pubDate><![CDATA[Tue, 5 Jul 2011 09:56:52]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
			<item>
				<title>回复:关于开发环境搭建</title>
				<description><![CDATA[ 更新代码后，该问题已经解决。]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1085.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1085.page</link>
				<pubDate><![CDATA[Tue, 5 Jul 2011 10:18:10]]> GMT</pubDate>
				<author><![CDATA[ 十鼎]]></author>
			</item>
			<item>
				<title>回复:关于开发环境搭建</title>
				<description><![CDATA[ 接下来我会继续测试这个软件，并在这里提交我发现的问题。希望站长欢迎。]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1086.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1086.page</link>
				<pubDate><![CDATA[Tue, 5 Jul 2011 10:34:40]]> GMT</pubDate>
				<author><![CDATA[ 十鼎]]></author>
			</item>
			<item>
				<title>回覆:关于开发环境搭建</title>
				<description><![CDATA[ 感謝您的熱心協助，如果您有發現新的問題，將會併入下一版JForum 2.3.1中修正。]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1087.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1087.page</link>
				<pubDate><![CDATA[Tue, 5 Jul 2011 10:40:06]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
			<item>
				<title>回复:关于开发环境搭建</title>
				<description><![CDATA[ 测试中发现投票功能BUG，版本2.3.0，在2.2.1上没有出现。 
<br>
现象：发起一个投票的主题后，自己或者其他可投票的会员点击“检视结果”，出现异常。投票帖和异常抓图见附件。]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1088.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1088.page</link>
				<pubDate><![CDATA[Tue, 5 Jul 2011 14:48:16]]> GMT</pubDate>
				<author><![CDATA[ 十鼎]]></author>
			</item>
			<item>
				<title>关于版主的显示功能</title>
				<description><![CDATA[ 问题1、现在，在每一个版面显示的版主是在该版面拥有版主权限的用户群组名称。通常在管理后台为每个版面添加一个对应的用户群组，设置为该版面的版主权限。然后再将一些用户设置到该群组，这样他们就是这个版面的版主了。 
<br>
<br>
我想，我们的期望是显示属于该用户群组的用户名称。 
<br>
<br>
问题2、发表主题时，过长的标题会使得首页的“最后发表”栏自动调整宽度，而不折行，结果会破坏首页布局效果； 
<br>
<br>
问题3、每个主题里面的回复没有楼层数字（即回复的次数），有楼层数字会得到更直观的信息表达；]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1089.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1089.page</link>
				<pubDate><![CDATA[Tue, 5 Jul 2011 17:21:58]]> GMT</pubDate>
				<author><![CDATA[ 十鼎]]></author>
			</item>
			<item>
				<title>回复:关于开发环境搭建</title>
				<description><![CDATA[ 问题4、在使用后台管理的封锁控制功能时，添加新的封锁控制，不管选什么封锁类型，点击“更新”会引起异常。 
<br>
 异常提示信息见附件抓图： 
<br>]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1090.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1090.page</link>
				<pubDate><![CDATA[Tue, 5 Jul 2011 21:47:58]]> GMT</pubDate>
				<author><![CDATA[ 十鼎]]></author>
			</item>
			<item>
				<title>回复:关于开发环境搭建</title>
				<description><![CDATA[ [quote=十鼎]测试中发现投票功能BUG，版本2.3.0，在2.2.1上没有出现。 
<br>
现象：发起一个投票的主题后，自己或者其他可投票的会员点击“检视结果”，出现异常。投票帖和异常抓图见附件。[/quote] 
<br>
<br>
請修改一下templates/default/post_show.htm第113行： 
<br>
<br>
[code]&lt;span class="gensmall" style="text-align:center"&gt;&lt;a href="${JForumContext.encodeURL("/posts/list/${topic.id}")}?viewResults=true"&gt;${I18n.getMessage("PostShow.showPollResults")}&lt;/a&gt;&lt;/span&gt;[/code]]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1091.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1091.page</link>
				<pubDate><![CDATA[Wed, 6 Jul 2011 08:11:02]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
			<item>
				<title>回复:关于开发环境搭建</title>
				<description><![CDATA[ 一个主题的文章列表分页后点击第二页出异常。 
<br>
情况如下：管理后台设置每页12篇文章，该主题共16个回复，第一页只显示了4篇文章，当点击第二页时出现了异常。异常提示见附件。 
<br>
<br>
如果在后台管理--&gt;系统设置--&gt;缓存设置--&gt;缓存最近 被读取 的主题到内存 将该设置项关闭，然后再重复前面的页面请求，则一切正常。]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1092.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1092.page</link>
				<pubDate><![CDATA[Thu, 7 Jul 2011 17:36:28]]> GMT</pubDate>
				<author><![CDATA[ 十鼎]]></author>
			</item>
			<item>
				<title>回复:关于开发环境搭建</title>
				<description><![CDATA[ 大概的原因我找到了，net.jforum.repository.PostRepository类的函数selectAllByTopicByLimit似乎有逻辑上欠缺。]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1093.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1093.page</link>
				<pubDate><![CDATA[Thu, 7 Jul 2011 23:46:49]]> GMT</pubDate>
				<author><![CDATA[ 十鼎]]></author>
			</item>
			<item>
				<title>关于版主的显示功能</title>
				<description><![CDATA[ [quote=十鼎]问题3、每个主题里面的回复没有楼层数字（即回复的次数），有楼层数字会得到更直观的信息表达；[/quote] 
<br>
可以修改templates/default/post_show_action_buttons_inc.htm的第4行，於行首加上#${post_index+1+start}成為: 
<br>
[code]#${post_index+1+start}&lt;a href="${JForumContext.encodeURL("/posts/list/${startStr}${post.topicId}")}#p${post.id}"&gt;[/code]]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1094.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1094.page</link>
				<pubDate><![CDATA[Fri, 8 Jul 2011 12:06:50]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
			<item>
				<title>回复:关于开发环境搭建</title>
				<description><![CDATA[ [quote=十鼎]问题4、在使用后台管理的封锁控制功能时，添加新的封锁控制，不管选什么封锁类型，点击“更新”会引起异常。 
<br>
 异常提示信息见附件抓图： 
<br>
[/quote] 
<br>
這個問題跟資料庫有關，由於我使用的是PostgreSQL資料庫，沒有這個問題，但是MySQL之類的資料庫就會有。 
<br>
修改一下/trunk/src/main/java/net/jforum/dao/generic/GenericBanlistDAO.java的第93-94行： 
<br>
[code] 
<br>
 public void insert(final Banlist banlist) 
<br>
 { 
<br>
 PreparedStatement pstmt = null; 
<br>
<br>
 try { 
<br>
 pstmt = JForumExecutionContext.getConnection().prepareStatement( 
<br>
 SystemGlobals.getSql("BanlistModel.insert")); 
<br>
 ... 
<br>
 } 
<br>
[/code] 
<br>
改為如下： 
<br>
[code] 
<br>
 public void insert(final Banlist banlist) 
<br>
 { 
<br>
 PreparedStatement pstmt = null; 
<br>
<br>
 try { 
<br>
 pstmt = this.getStatementForAutoKeys("BanlistModel.insert"); 
<br>
 ... 
<br>
 }[/code]]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1095.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1095.page</link>
				<pubDate><![CDATA[Fri, 8 Jul 2011 12:14:46]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
			<item>
				<title>关于版主的显示功能</title>
				<description><![CDATA[ [quote=andowson][quote=十鼎]问题3、每个主题里面的回复没有楼层数字（即回复的次数），有楼层数字会得到更直观的信息表达；[/quote] 
<br>
可以修改templates/default/post_show_action_buttons_inc.htm的第4行，於行首加上#${post_index+1+start}成為: 
<br>
[code]#${post_index+1+start}&lt;a href="${JForumContext.encodeURL("/posts/list/${startStr}${post.topicId}")}#p${post.id}"&gt;[/code][/quote] 
<br>
<br>
嗯，我也已经改好了。 
<br>
顺便说一下，我在杭州访问你的网站感觉速度有点慢。 
<br>]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1096.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1096.page</link>
				<pubDate><![CDATA[Fri, 8 Jul 2011 12:44:42]]> GMT</pubDate>
				<author><![CDATA[ 十鼎]]></author>
			</item>
			<item>
				<title>关于版主的显示功能</title>
				<description><![CDATA[ [quote=十鼎][quote=andowson][quote=十鼎]问题3、每个主题里面的回复没有楼层数字（即回复的次数），有楼层数字会得到更直观的信息表达；[/quote] 
<br>
可以修改templates/default/post_show_action_buttons_inc.htm的第4行，於行首加上#${post_index+1+start}成為: 
<br>
[code]#${post_index+1+start}&lt;a href="${JForumContext.encodeURL("/posts/list/${startStr}${post.topicId}")}#p${post.id}"&gt;[/code][/quote] 
<br>
<br>
嗯，我也已经改好了。 
<br>
顺便说一下，我在杭州访问你的网站感觉速度有点慢。 
<br>
[/quote] 
<br>
可否請您不吝分享您的修正方式，謝謝～ 
<br>
我也感覺到最近有點變慢的樣子，可能是流量上升的關係吧。]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1097.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1097.page</link>
				<pubDate><![CDATA[Fri, 8 Jul 2011 14:40:00]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
			<item>
				<title>回复:关于开发环境搭建</title>
				<description><![CDATA[ 显示楼层的实现和楼主的方式大体一致，只是位置不同。 
<br>
为每个版面显示版主用户名的方法如下： 
<br>
-------------------------------------- 
<br>
功能实现： 
<br>
1、修改模版文件forum_show.htm 
<br>
... ... 
<br>
[code] 
<br>
&lt;td valign="top" align="left"&gt; 
<br>
 &lt;#include "folder_descriptions.htm"/&gt; 
<br>
&lt;/td&gt; 
<br>
<br>
&lt;#assign moderators = forum.getModeratorUsersList()/&gt; 
<br>
&lt;#if (moderators.size() &gt; 0)&gt; 
<br>
 &lt;td align="right" class="gensmall"&gt; 
<br>
 ${I18n.getMessage("ForumIndex.forumAdmins")}: 
<br>
 &lt;b&gt; 
<br>
 &lt;#list moderators as m&gt; 
<br>
 &lt;a href="${JForumContext.encodeURL("/user/profile/${m.id}")}"&gt;${m.name?html}&lt;/a&gt; 
<br>
 &lt;/#list&gt; 
<br>
 &lt;/b&gt; 
<br>
 &lt;/td&gt; 
<br>
&lt;/#if&gt; 
<br>
[/code] 
<br>
2、在代码文件net.jforum.entities.Forum中实现函数: 
<br>
[code] 
<br>
public List&lt;ModeratorInfo&gt; getModeratorUsersList() 
<br>
{ 
<br>
 return ForumRepository.getModeratorUsersList(this.id); 
<br>
} 
<br>
[/code] 
<br>
3、在代码文件 net.jforum.repository.ForumRepository中实现函数： 
<br>
[code] 
<br>
public static List&lt;ModeratorInfo&gt; getModeratorUsersList(final int forumId) 
<br>
{ 
<br>
 //TODO... 添加缓存功能 
<br>
 List&lt;ModeratorInfo&gt; list = null; 
<br>
 if (list == null) { 
<br>
 synchronized (MUTEX_FQN_MODERATORS_USERS) { 
<br>
 try { 
<br>
 list =DataAccessDriver.getInstance().newForumDAO() 
<br>
 .getModeratorUserList(forumId); 
<br>
 } 
<br>
 catch (Exception e) { 
<br>
 throw new DatabaseException(e); 
<br>
 } 
<br>
 }//end of synchronized 
<br>
 } 
<br>
 return list; 
<br>
} 
<br>
[/code] 
<br>
<br>
4、为ForumDAO添加新的接口getModeratorUserList； 
<br>
5、为GenericForumDAO 实现接口getModeratorUserList； 
<br>
[code] 
<br>
/** 
<br>
* @see net.jforum.dao.ForumDAO#getModeratorUserList(int) 
<br>
*/ 
<br>
public List&lt;ModeratorInfo&gt; getModeratorUserList(int forumId) { 
<br>
List&lt;ModeratorInfo&gt; list = new ArrayList&lt;ModeratorInfo&gt;(); 
<br>
<br>
PreparedStatement pstmt = null; 
<br>
ResultSet resultSet = null; 
<br>
try { 
<br>
pstmt = JForumExecutionContext.getConnection().prepareStatement( 
<br>
SystemGlobals.getSql("ForumModel.getModeratorUserList")); 
<br>
pstmt.setInt(1, forumId); 
<br>
<br>
resultSet = pstmt.executeQuery(); 
<br>
<br>
while (resultSet.next()) { 
<br>
ModeratorInfo moderatorInfo = new ModeratorInfo(); 
<br>
moderatorInfo.setId(resultSet.getInt("id")); 
<br>
moderatorInfo.setName(resultSet.getString("name")); 
<br>
<br>
list.add(moderatorInfo); 
<br>
} 
<br>
<br>
return list; 
<br>
} 
<br>
catch (SQLException e) { 
<br>
throw new DatabaseException(e); 
<br>
} 
<br>
finally { 
<br>
DbUtils.close(resultSet, pstmt); 
<br>
} 
<br>
} 
<br>
[/code] 
<br>
<br>
6、为ForumModel.getModeratorUserList添加mysql语句： 
<br>
[code] 
<br>
ForumModel.getModeratorUserList = SELECT u.user_id AS id, u.username AS name \ 
<br>
FROM jforum_groups g, jforum_roles r, jforum_role_values rv, jforum_roles r2, jforum_users u, jforum_user_groups ug \ 
<br>
WHERE g.group_id = r.group_id \ 
<br>
AND r.role_id = rv.role_id \ 
<br>
AND r.name = 'perm_moderation_forums' \ 
<br>
AND rv.role_value = ? \ 
<br>
AND r2.name = 'perm_moderation' \ 
<br>
AND r2.group_id = g.group_id \ 
<br>
AND g.group_id = ug.group_id \ 
<br>
AND ug.user_id = u.user_id 
<br>
[/code] 
<br>
---------------------------------------------------]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1098.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1098.page</link>
				<pubDate><![CDATA[Fri, 8 Jul 2011 15:50:32]]> GMT</pubDate>
				<author><![CDATA[ 十鼎]]></author>
			</item>
			<item>
				<title>回复:关于开发环境搭建</title>
				<description><![CDATA[ 为主题的文章进行缓存功能，我感觉有问题（我的理解），如果我理解有误还请指教。楼主，你的理解如何？]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1099.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1099.page</link>
				<pubDate><![CDATA[Fri, 8 Jul 2011 16:01:10]]> GMT</pubDate>
				<author><![CDATA[ 十鼎]]></author>
			</item>
			<item>
				<title>回复:关于开发环境搭建</title>
				<description><![CDATA[ [quote=十鼎]为主题的文章进行缓存功能，我感觉有问题（我的理解），如果我理解有误还请指教。楼主，你的理解如何？[/quote] 
<br>
<br>
應該是有問題沒錯，有可能是我誤改了原來的程式碼 
<br>
trunk/src/main/java/net/jforum/repository/PostRepository.java的118行： 
<br>
[code=java; first-line:118]posts = pm.selectAllByTopicByLimit(topicId, start, count);[/code] 
<br>
將其還原為： 
<br>
[code=java; first-line:118]posts = pm.selectAllByTopic(topicId);[/code] 
<br>
再測測看吧！ 
<br>
<br>
另外，您在發表程式碼時可否幫忙加上code的標籤，以便套用原始碼排版？謝謝您！ 
<br>
可參考這篇的說明： 
<br>
http://www.andowson.com/posts/list/133.page]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1100.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1100.page</link>
				<pubDate><![CDATA[Fri, 8 Jul 2011 16:35:16]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
			<item>
				<title>回复:关于开发环境搭建</title>
				<description><![CDATA[ [quote=andowson][quote=十鼎]为主题的文章进行缓存功能，我感觉有问题（我的理解），如果我理解有误还请指教。楼主，你的理解如何？[/quote] 
<br>
<br>
應該是有問題沒錯，有可能是我誤改了原來的程式碼 
<br>
trunk/src/main/java/net/jforum/repository/PostRepository.java的118行： 
<br>
[code=java; first-line:118]posts = pm.selectAllByTopicByLimit(topicId, start, count);[/code] 
<br>
將其還原為： 
<br>
[code=java; first-line:118]posts = pm.selectAllByTopic(topicId);[/code] 
<br>
再測測看吧！ 
<br>
<br>
另外，您在發表程式碼時可否幫忙加上code的標籤，以便套用原始碼排版？謝謝您！ 
<br>
可參考這篇的說明： 
<br>
http://www.andowson.com/posts/list/133.page[/quote] 
<br>
<br>
看了你的才知道原来code标签可以这么用的。 :oops: 
<br>
调用selectAllByTopic函数是对的，在为主题获取某页文章的时候就将全部文章列表都放入缓存了，然后再取sublist。就是费内存呀。]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1102.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1102.page</link>
				<pubDate><![CDATA[Fri, 8 Jul 2011 16:57:00]]> GMT</pubDate>
				<author><![CDATA[ 十鼎]]></author>
			</item>
			<item>
				<title>关于版主的显示功能</title>
				<description><![CDATA[ [quote=十鼎] 
<br>
问题2、发表主题时，过长的标题会使得首页的“最后发表”栏自动调整宽度，而不折行，结果会破坏首页布局效果； 
<br>
[/quote] 
<br>
請修改forum_list.htm，將下列的程式碼複製貼到&lt;#include "bottom.htm"/&gt;之前即可： 
<br>
[code=javascript; first-line:188]&lt;script type="text/javascript"&gt; 
<br>
/* &lt;![CDATA[ */ 
<br>
function limitTitleSize() 
<br>
{ 
<br>
 $(".last_title").each(function () { 
<br>
 var value = $(this).text(); 
<br>
<br>
 if (value.length &gt; 30) { 
<br>
 $(this).text(value.substring(0, 30) + "..."); 
<br>
 } 
<br>
 }); 
<br>
} 
<br>
<br>
$(document).ready(function() { 
<br>
 limitTitleSize(); 
<br>
<br>
}); 
<br>
/* ]]&gt; */ 
<br>
&lt;/script&gt; 
<br>
[/code] 
<br>
<br>]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1103.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1103.page</link>
				<pubDate><![CDATA[Sat, 9 Jul 2011 18:38:34]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
			<item>
				<title>回复:关于开发环境搭建</title>
				<description><![CDATA[ 问题5：指定版面的版主却可以删除其他版面的文章或者主题。 
<br>
首先在管理后台的“会员分组”为一个会员所在的群组设置权限: 版主-&gt;是否允许设置为版主 设置为“是”；是否在允许的版块里审核/封锁贴子 设置为“是”；不能修改的论坛 设置为指定版面除外的所有其他版面。 
<br>
<br>
这样就可以将某个会员设置为指定版面的版主了（我是这么理解的）。现在的问题是一个版面的版主不应该有权修改或者删除其他版面的主题的文章，除非该文章是他（她）发布的。 
<br>
<br>
问题6：在封锁控制中添加了对某个用户ID的封锁，登陆后得到已经被封锁的提示，但是无法再以游客的身份浏览本网站了，点击"注销"和"论坛首页"都没有任何响应。 合理的希望应该是点击"注销"和"论坛首页"时以游客身份回到首页。]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1104.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1104.page</link>
				<pubDate><![CDATA[Sat, 9 Jul 2011 21:39:40]]> GMT</pubDate>
				<author><![CDATA[ 十鼎]]></author>
			</item>
			<item>
				<title>回复:关于开发环境搭建</title>
				<description><![CDATA[ [quote=十鼎]问题5：指定版面的版主却可以删除其他版面的文章或者主题。 
<br>
首先在管理后台的“会员分组”为一个会员所在的群组设置权限: 版主-&gt;是否允许设置为版主 设置为“是”；是否在允许的版块里审核/封锁贴子 设置为“是”；不能修改的论坛 设置为指定版面除外的所有其他版面。 
<br>
<br>
这样就可以将某个会员设置为指定版面的版主了（我是这么理解的）。现在的问题是一个版面的版主不应该有权修改或者删除其他版面的主题的文章，除非该文章是他（她）发布的。 
<br>
<br>
问题6：在封锁控制中添加了对某个用户ID的封锁，登陆后得到已经被封锁的提示，但是无法再以游客的身份浏览本网站了，点击"注销"和"论坛首页"都没有任何响应。 合理的希望应该是点击"注销"和"论坛首页"时以游客身份回到首页。[/quote] 
<br>
<br>
問題5的處理： 
<br>
修改post_show_action_buttons_inc.htm: 第18行及第22行，如下： 
<br>
[code=html; first-line:18] &lt;#if canEditCurrentMessage &amp;&amp; (((post.userId == session.userId) &amp;&amp; (session.userId != 1)) || isModerator || isAdmin)&gt; 
<br>
 &lt;a href="${JForumContext.encodeURL("/${moduleName}/edit/${start}/${post.id}")}" rel="nofollow" class="icon_edit"&gt;&lt;img src="${contextPath}/images/transp.gif" alt="" /&gt;&lt;/a&gt; 
<br>
 &lt;/#if&gt; 
<br>
<br>
 &lt;#if canRemove &amp;&amp; (((post.userId == session.userId) &amp;&amp; (session.userId != 1)) || isModerator || isAdmin)&gt; 
<br>
 &lt;a href="${JForumContext.encodeURL("/${moduleName}/delete/${start}/${post.id}")}" id="delete${post.id}" onclick="return confirmDelete(${post.id});"&gt;&lt;img src="${contextPath}/templates/${templateName}/images/icon_delete.gif" alt="[Delete]" /&gt;&lt;/a&gt; 
<br>
 &lt;/#if&gt;[/code] 
<br>
<br>
問題6的處理： 
<br>
修改JForum.java第210行，加上條件判斷: 
<br>
[code=java; first-line:208] 
<br>
 final boolean shouldBan = this.shouldBan(request.getRemoteAddr()); 
<br>
<br>
 if (shouldBan &amp;&amp; !"logout".equals(request.getAction())) { 
<br>
 moduleClass = ModulesRepository.getModuleClass("forums"); 
<br>
 context.put("moduleName", "forums"); 
<br>
 ((WebRequestContext)request).changeAction("banned"); 
<br>
 } 
<br>
[/code]]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1105.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1105.page</link>
				<pubDate><![CDATA[Sat, 9 Jul 2011 23:39:57]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
			<item>
				<title>回复:关于开发环境搭建</title>
				<description><![CDATA[ 问题7、似乎无法使用文章审核功能？ 
<br>
<br>
关于个人资料显示问题： 
<br>
 在多个页面中都有会员链接，点击链接就会看到这个会员的个人资料信息，包括：注册时间、发起的主题数、回复的文章数等等信息。当一个会员登录的时候，点击页面头部的“个人资料”链接则进入个人资料的编辑界面。我个人觉得会员登录后，查看自己的个人资料信息存在着不便利性。 
<br>
 所以实现功能：自己个人资料快速查看入口，见附件图。 
<br>
<br>
实现：在模版文件user_form.htm中添加入user_profile.htm的个人资料对应的HTML码，然后分别在net.jforum.view.forum.UserAction.java 和net.jforum.view.admin.UserAction.java 的edit（）函数中添加代码： 
<br>
[code] 
<br>
 this.context.put("karmaEnabled", SecurityRepository.canAccess(SecurityConstants.PERM_KARMA_ENABLED)); 
<br>
 this.context.put("rank", new RankingRepository()); 
<br>
 this.context.put("u", user); 
<br>
 this.context.put("avatarAllowExternalUrl", SystemGlobals.getBoolValue(ConfigKeys.AVATAR_ALLOW_EXTERNAL_URL)); 
<br>
<br>
 int loggedId = SessionFacade.getUserSession().getUserId(); 
<br>
 int count = 0; 
<br>
 DataAccessDriver da = DataAccessDriver.getInstance(); 
<br>
<br>
 List&lt;Bookmark&gt; bookmarks = da.newBookmarkDAO().selectByUser(user.getId()); 
<br>
 if(loggedId == user.getId()) 
<br>
 count = bookmarks.size(); 
<br>
 else{ 
<br>
 for (Iterator&lt;Bookmark&gt; iter = bookmarks.iterator(); iter.hasNext(); ) { 
<br>
 Bookmark bookmark = iter.next(); 
<br>
 if (bookmark.isPublicVisible()) { 
<br>
 count++; 
<br>
 } 
<br>
 } 
<br>
 } 
<br>
<br>
 this.context.put("nbookmarks", Integer.valueOf(count)); 
<br>
 this.context.put("ntopics", Integer.valueOf(da.newTopicDAO().countUserTopics(user.getId()))); 
<br>
 this.context.put("nposts", Integer.valueOf(da.newPostDAO().countUserPosts(user.getId()))); 
<br>
 this.context.put("tally", Integer.valueOf(da.newUserDAO().getUserTally(user.getId()))); 
<br>
[/code] 
<br>
<br>
<br>
后续打算添加积分功能，现在只能统计文章数，并且不区分主题和回复类型，无法区分会员活跃程度和社区荣誉。]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1107.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1107.page</link>
				<pubDate><![CDATA[Tue, 12 Jul 2011 16:07:15]]> GMT</pubDate>
				<author><![CDATA[ 十鼎]]></author>
			</item>
			<item>
				<title>回复:关于开发环境搭建</title>
				<description><![CDATA[ [quote=十鼎]问题7、似乎无法使用文章审核功能？[/quote] 
<br>
請修改樣板檔/admin/forum_form.htm第212行的mailIntegration.isSSL()為mailIntegration.isSsl()即可: 
<br>
[code=html; first-line:212]&lt;td&gt;&lt;input type="checkbox" name="requires_ssl" value="1" &lt;#if mailIntegration?exists &amp;&amp; mailIntegration.isSsl()&gt;checked="checked"&lt;/#if&gt; /&gt;&lt;/td&gt;[/code] 
<br>
<br>
測試方式： 
<br>
1.系統管理控制台 &gt; 版面管理 &gt; 建立新版面 
<br>
版面名稱 Moderated Forum 
<br>
審核這個版面? 是 
<br>
權限 
<br>
將沒選到的這些群組設為禁止存取: Administration General 
<br>
將沒選到的這些群組設為禁止匿名發表: 
<br>
將沒選到的這些群組設為唯讀: Administration General 
<br>
將沒選到的這些群組設為在訊息中禁止使用 HTML: Administration General 
<br>
[更新] 
<br>
群組管理 
<br>
群組名稱 動作 刪除 安全性 
<br>
Administration 編輯群組 權限 
<br>
點選權限 
<br>
<br>
版面管理 
<br>
不能審核這些版面: 允許全部 
<br>
[儲存] 
<br>
2.註冊一個新的使用者 
<br>
恭喜您! 
<br>
<br>
您已經完成註冊程序. 您可以按 這裡 填寫更多個人資料以及選取個人頭像, 或點選 這裡 回到首頁. 
<br>
<br>
記得喔!您隨時可以點選網頁上方的 "個人資料" 連結來修改您的個人資料. 
<br>
<br>
3.點選 這裡 回到首頁並在Moderated Forum發表文章，出現下列訊息： 
<br>
這是一個需要審核的版面. 
<br>
您的文章正在等候版面管理員分析處理. 請耐心等候一下. 
<br>
<br>
按這裡 繼續. 
<br>
<br>
討論區首頁 
<br>
4.登出 
<br>
5.使用Admin帳號登入 
<br>
6.系統管理控制台 &gt; 文章審核]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1108.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1108.page</link>
				<pubDate><![CDATA[Wed, 13 Jul 2011 00:25:19]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
			<item>
				<title>回复:关于开发环境搭建</title>
				<description><![CDATA[ 为了增加积分功能，我为数据库表jforum_users添加了一个字段tally(类型为int，默认值为0)，并修改了需要的相关SQL语句和数据库操作代码（主要是读取和更新user info），并为net.jforum.entities.User类添加成员 int tally;以及get、set函数。 
<br>
<br>
看了下数据库表jforum_posts里面，没有7天内的post记录。 
<br>
<br>
构建项目的时候出现以下错误提示： 
<br>
------------------------------ 
<br>
... 
<br>
Failed tests: 
<br>
 testListPosts(net.jforum.summary.SummaryTest): null 
<br>
<br>
Tests run: 62, Failures: 1, Errors: 0, Skipped: 0 
<br>
... 
<br>
------------------------------ 
<br>
<br>
分析代码，失败原因是testListPosts函数中的获取一周post list为空。我并不十分理解这里的post list是由哪部分测试用例创建的，是SummaryTest用例产生的，还是包含了本次构建所有测试用例产生的？跟我修改jforum_users 的表结构是否有关联？ 
<br>
<br>
我查看了关于获取和更新jforum_posts表的SQL语句和相关操作代码，看起来并没有与Jforum_users的tally字段有相交。 
<br>
<br>
请andowson指教一二！ 如能介绍下项目的测试用例功能的概况和原理就更佳了。 
<br>
<br>
谢谢了！ 
<br>
<br>
<br>
这个问题经过半天的了解，总结一下： 
<br>
构建过程中使用到的数据库是由执行脚本文件：mysql_data_dump.sql更新的，所以开始构建项目前需要执行一下这个脚本，执行后，jforum_posts表中多了一个表项，内容为：“Welcome to JForum”。 
<br>
<br>
每次构建过程执行的SummaryTest用例会测试发送发表文章摘要功能，这个用例使用的时间范围是7天，如果执行脚本mysql_data_dump.sql超过7天，即7天内没有新发表文章，则构建项目时该测试用例会得到空的post list。 
<br>
<br>
这个测试用例似乎需要重新考虑文章摘要的时间范围。 
<br>
<br>
<br>]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1110.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1110.page</link>
				<pubDate><![CDATA[Wed, 13 Jul 2011 14:26:19]]> GMT</pubDate>
				<author><![CDATA[ 十鼎]]></author>
			</item>
			<item>
				<title>回复:关于开发环境搭建</title>
				<description><![CDATA[ [quote=十鼎]为了增加积分功能，我为数据库表jforum_users添加了一个字段tally(类型为int，默认值为0)，并修改了需要的相关SQL语句和数据库操作代码（主要是读取和更新user info），并为net.jforum.entities.User类添加成员 int tally;以及get、set函数。 
<br>
<br>
看了下数据库表jforum_posts里面，没有7天内的post记录。 
<br>
<br>
构建项目的时候出现以下错误提示： 
<br>
------------------------------ 
<br>
... 
<br>
Failed tests: 
<br>
 testListPosts(net.jforum.summary.SummaryTest): null 
<br>
<br>
Tests run: 62, Failures: 1, Errors: 0, Skipped: 0 
<br>
... 
<br>
------------------------------ 
<br>
<br>
分析代码，失败原因是testListPosts函数中的获取一周post list为空。我并不十分理解这里的post list是由哪部分测试用例创建的，是SummaryTest用例产生的，还是包含了本次构建所有测试用例产生的？跟我修改jforum_users 的表结构是否有关联？ 
<br>
<br>
我查看了关于获取和更新jforum_posts表的SQL语句和相关操作代码，看起来并没有与Jforum_users的tally字段有相交。 
<br>
<br>
请andowson指教一二！ 如能介绍下项目的测试用例功能的概况和原理就更佳了。 
<br>
<br>
谢谢了！ 
<br>
<br>
<br>
这个问题经过半天的了解，总结一下： 
<br>
构建过程中使用到的数据库是由执行脚本文件：mysql_data_dump.sql更新的，所以开始构建项目前需要执行一下这个脚本，执行后，jforum_posts表中多了一个表项，内容为：“Welcome to JForum”。 
<br>
<br>
每次构建过程执行的SummaryTest用例会测试发送发表文章摘要功能，这个用例使用的时间范围是7天，如果执行脚本mysql_data_dump.sql超过7天，即7天内没有新发表文章，则构建项目时该测试用例会得到空的post list。 
<br>
<br>
这个测试用例似乎需要重新考虑文章摘要的时间范围。 
<br>
<br>
<br>
[/quote] 
<br>
SummaryTest中的post list如您所理解的，是去抓取資料庫中目前七天內發表的新文章，測試案例中所發表的文章會於測試完畢時自動刪除，故這些文章的來源是由使用者自行部署到Tomcat webapps去測試時產生。 
<br>
以我自己來說，我每次執行完Eclipse的Run As &gt; maven package後，會將target\jforum目錄copy回Tomcat的webapps目錄下去進行測試，使用的資料庫名稱就是jforum，與Eclipse所連的測試資料庫一致。 
<br>]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1112.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1112.page</link>
				<pubDate><![CDATA[Fri, 15 Jul 2011 07:38:22]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
			<item>
				<title>回复:关于开发环境搭建</title>
				<description><![CDATA[ 难怪，我的项目构建使用的数据库和实际部署使用的库是分开的。]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1113.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1113.page</link>
				<pubDate><![CDATA[Fri, 15 Jul 2011 10:22:10]]> GMT</pubDate>
				<author><![CDATA[ 十鼎]]></author>
			</item>
			<item>
				<title>回复:关于开发环境搭建</title>
				<description><![CDATA[ 问题：删除一个主题时，用户的文章数并没有减去相应数量。]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1115.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1115.page</link>
				<pubDate><![CDATA[Tue, 19 Jul 2011 07:14:03]]> GMT</pubDate>
				<author><![CDATA[ 十鼎]]></author>
			</item>
			<item>
				<title>回复:关于开发环境搭建</title>
				<description><![CDATA[ [quote=andowson][quote=十鼎]为主题的文章进行缓存功能，我感觉有问题（我的理解），如果我理解有误还请指教。楼主，你的理解如何？[/quote] 
<br>
<br>
應該是有問題沒錯，有可能是我誤改了原來的程式碼 
<br>
trunk/src/main/java/net/jforum/repository/PostRepository.java的118行： 
<br>
[code=java; first-line:118]posts = pm.selectAllByTopicByLimit(topicId, start, count);[/code] 
<br>
將其還原為： 
<br>
[code=java; first-line:118]posts = pm.selectAllByTopic(topicId);[/code] 
<br>
再測測看吧！ 
<br>
<br>
另外，您在發表程式碼時可否幫忙加上code的標籤，以便套用原始碼排版？謝謝您！ 
<br>
可參考這篇的說明： 
<br>
http://www.andowson.com/posts/list/133.page[/quote] 
<br>
<br>
旧的设置为：每页主题数15，然后设置为每页10； 
<br>
在某个版面发表新的主题，直到该版面有12个，当超过10时，页导航出现2页，但是首页主题数为12，次页有2页。 
<br>
这个问题与上面的问题存在相同的逻辑。 
<br>
<br>
重启服务器后，正常。 
<br>
问题所在的位置在：net.jforum.view.forum.common.TopicsCommon.java L102。 
<br>
看来主题缓存和文章缓存都有进一步改进机会。]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1116.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1116.page</link>
				<pubDate><![CDATA[Tue, 19 Jul 2011 20:17:25]]> GMT</pubDate>
				<author><![CDATA[ 十鼎]]></author>
			</item>
			<item>
				<title>回复:关于开发环境搭建</title>
				<description><![CDATA[ [quote=十鼎]问题：删除一个主题时，用户的文章数并没有减去相应数量。[/quote] 
<br>
請修改一下src/main/java/net/jforum/dao/generic/GenericPostDAO.java#removePosts()，加上 
<br>
userDAO.decrementPosts(post.getUserId()); 
<br>
[code] 
<br>
... 
<br>
import net.jforum.dao.UserDAO; 
<br>
... 
<br>
<br>
 private void removePosts(List&lt;Post&gt; posts) 
<br>
 { 
<br>
 PreparedStatement pstmtPost = null; 
<br>
 PreparedStatement pstmtText = null; 
<br>
 UserDAO userDAO = DataAccessDriver.getInstance().newUserDAO(); 
<br>
<br>
 try { 
<br>
 pstmtPost = JForumExecutionContext.getConnection() 
<br>
 .prepareStatement(SystemGlobals.getSql("PostModel.deletePost")); 
<br>
<br>
 pstmtText = JForumExecutionContext.getConnection().prepareStatement( 
<br>
 SystemGlobals.getSql("PostModel.deletePostText")); 
<br>
<br>
 for (Iterator&lt;Post&gt; iter = posts.iterator(); iter.hasNext();) { 
<br>
 Post post = iter.next(); 
<br>
<br>
 pstmtPost.setInt(1, post.getId()); 
<br>
 pstmtText.setInt(1, post.getId()); 
<br>
<br>
 pstmtText.executeUpdate(); 
<br>
 pstmtPost.executeUpdate(); 
<br>
<br>
 SearchFacade.delete(post); 
<br>
 userDAO.decrementPosts(post.getUserId()); 
<br>
 } 
<br>
 } 
<br>
 catch (SQLException e) { 
<br>
 throw new DatabaseException(e); 
<br>
 } 
<br>
 finally { 
<br>
 DbUtils.close(pstmtPost); 
<br>
 DbUtils.close(pstmtText); 
<br>
 } 
<br>
 } 
<br>
[/code] 
<br>
<br>
然後修改src/main/java/net/jforum/view/forum/PostAction.java#delete() 
<br>
[code] 
<br>
 public void delete() 
<br>
 { 
<br>
 .... 
<br>
 postDao.delete(post); 
<br>
 //刪掉這行DataAccessDriver.getInstance().newUserDAO().decrementPosts(post.getUserId()); 
<br>
 ... 
<br>
 } 
<br>
[/code] 
<br>]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1119.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1119.page</link>
				<pubDate><![CDATA[Fri, 22 Jul 2011 09:48:09]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
			<item>
				<title>回复:关于开发环境搭建</title>
				<description><![CDATA[ [quote=十鼎][quote=andowson][quote=十鼎]为主题的文章进行缓存功能，我感觉有问题（我的理解），如果我理解有误还请指教。楼主，你的理解如何？[/quote]
<br>
<br>
應該是有問題沒錯，有可能是我誤改了原來的程式碼
<br>
trunk/src/main/java/net/jforum/repository/PostRepository.java的118行：
<br>
[code=java; first-line:118]posts = pm.selectAllByTopicByLimit(topicId, start, count);[/code]
<br>
將其還原為：
<br>
[code=java; first-line:118]posts = pm.selectAllByTopic(topicId);[/code]
<br>
再測測看吧！
<br>
<br>
另外，您在發表程式碼時可否幫忙加上code的標籤，以便套用原始碼排版？謝謝您！
<br>
可參考這篇的說明：
<br>
http://www.andowson.com/posts/list/133.page[/quote]
<br>
<br>
旧的设置为：每页主题数15，然后设置为每页10；
<br>
在某个版面发表新的主题，直到该版面有12个，当超过10时，页导航出现2页，但是首页主题数为12，次页有2页。
<br>
这个问题与上面的问题存在相同的逻辑。
<br>
<br>
重启服务器后，正常。 
<br>
问题所在的位置在：net.jforum.view.forum.common.TopicsCommon.java L102。
<br>
看来主题缓存和文章缓存都有进一步改进机会。[/quote]
<br>
如您所說的cache機制目前尚需測試來確認是否可正常運作，這個問題可以由修改trunk/src/main/java/net/jforum/view/forum/common/TopicsCommon.java#topicsByForum()來解決：
<br>
[code=java;first-line:85]
<br>
 /**
<br>
 * List all first 'n' topics of a given forum.
<br>
 * This method returns no more than &lt;code&gt;ConfigKeys.TOPICS_PER_PAGE&lt;/code&gt;
<br>
 * topics for the forum. 
<br>
 * 
<br>
 * @param forumId The forum id to which the topics belongs to
<br>
 * @param start The start fetching index
<br>
 * @return &lt;code&gt;java.util.List&lt;/code&gt; containing the topics found.
<br>
 */
<br>
 public static List&lt;Topic&gt; topicsByForum(int forumId, int start)
<br>
 {
<br>
 TopicDAO tm = DataAccessDriver.getInstance().newTopicDAO();
<br>
 int topicsPerPage = SystemGlobals.getIntValue(ConfigKeys.TOPICS_PER_PAGE);
<br>
 List&lt;Topic&gt; topics;
<br>
<br>
 // Try to get the first's page of topics from the cache
<br>
 if (SystemGlobals.getBoolValue(ConfigKeys.TOPIC_CACHE_ENABLED)) {
<br>
 topics = TopicRepository.getTopics(forumId);
<br>
<br>
 if (topics.isEmpty() || !TopicRepository.isLoaded(forumId)) {
<br>
 synchronized (MUTEXT) {
<br>
 if (topics.isEmpty() || !TopicRepository.isLoaded(forumId)) {
<br>
 topics = tm.selectAllByForum(forumId);
<br>
 TopicRepository.addAll(forumId, topics);
<br>
 }
<br>
 }
<br>
 }
<br>
 }
<br>
 else {
<br>
 topics = tm.selectAllByForumByLimit(forumId, start, topicsPerPage);
<br>
 }
<br>
<br>
 int size = topics.size();
<br>
 return topics.subList(start, (size &lt; start + topicsPerPage) ? size : start + topicsPerPage);
<br>
 }
<br>
[/code]
<br>
改為topics = tm.selectAllByForum(forumId);
<br>
然後return topics.subList(start, (size &lt; start + topicsPerPage) ? size : start + topicsPerPage);]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1120.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1120.page</link>
				<pubDate><![CDATA[Fri, 22 Jul 2011 09:58:53]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
			<item>
				<title>回复:关于开发环境搭建</title>
				<description><![CDATA[ 关于运行时更新配置文件引起的异常问题 
<br>
jforum支持运行时更新配置文件功能，运行时会监测主要的配置文件是否被更新，如果发现则重新装载。相关代码见SystemGlobalsListener.java 文件： 
<br>
[code=java; first-line:60] 
<br>
 public void fileChanged(final String filename) 
<br>
 { 
<br>
 LOGGER.info("Reloading "+ filename); 
<br>
<br>
 SystemGlobals.reset(); //这里已经清空了所有配置信息 
<br>
 SystemGlobals.initGlobals(SystemGlobals.getApplicationPath(), 
<br>
 SystemGlobals.getValue(ConfigKeys.DEFAULT_CONFIG));//这里希望取出默认配置文件名，返回值为空 
<br>
 } 
<br>
[/code] 
<br>
<br>
文件SystemGlobals.java 
<br>
[code=java; first-line:118] 
<br>
 private void buildSystem(String appPath, String mainConfigurationFile) 
<br>
 { 
<br>
 if (mainConfigurationFile == null) { 
<br>
 throw new InvalidParameterException("defaultConfig could not be null");//空的路径参数导致抛出异常 
<br>
 } 
<br>
<br>
 this.defaultConfig = mainConfigurationFile; 
<br>
 this.defaults = new Properties(); 
<br>
[/code]]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1123.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1123.page</link>
				<pubDate><![CDATA[Tue, 26 Jul 2011 17:51:41]]> GMT</pubDate>
				<author><![CDATA[ 十鼎]]></author>
			</item>
			<item>
				<title>回复:关于开发环境搭建</title>
				<description><![CDATA[ [quote=十鼎]关于运行时更新配置文件引起的异常问题 
<br>
jforum支持运行时更新配置文件功能，运行时会监测主要的配置文件是否被更新，如果发现则重新装载。相关代码见SystemGlobalsListener.java 文件： 
<br>
[code=java; first-line:60] 
<br>
 public void fileChanged(final String filename) 
<br>
 { 
<br>
 LOGGER.info("Reloading "+ filename); 
<br>
<br>
 SystemGlobals.reset(); //这里已经清空了所有配置信息 
<br>
 SystemGlobals.initGlobals(SystemGlobals.getApplicationPath(), 
<br>
 SystemGlobals.getValue(ConfigKeys.DEFAULT_CONFIG));//这里希望取出默认配置文件名，返回值为空 
<br>
 } 
<br>
[/code] 
<br>
[/quote] 
<br>
嗯！這個問題只要把SystemGlobals.reset();這行刪掉即可解決。]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1124.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1124.page</link>
				<pubDate><![CDATA[Tue, 26 Jul 2011 19:09:27]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
			<item>
				<title>回复:关于开发环境搭建</title>
				<description><![CDATA[ 我为后台管理添加新的功能页面，浏览器请求显示时，freemarker处理新模版文件页面中的&lt;#include "header.htm"/&gt;，会插入default目录下的header.htm而不是default/admin/header.htm ，反复查看了各个环节未能找到原因所在，请求指教 ！ 
<br>
<br>
我为后台管理添加新功能页面，涉及的环节如下： 
<br>
1、在default/admin/menu.htm添加新功能链接，点击这个链接可以显示新功能页面； 
<br>
[code=html; first-line:123] 
<br>
&lt;tr&gt; 
<br>
&lt;td class="row1"&gt;&lt;a id="recommTopics" class="genmed" href="${JForumContext.encodeURL("/adminRecommTopics/list")}" target="main"&gt;${I18n.getMessage("AdminTopics.index")}&lt;/a&gt;&lt;/td&gt; 
<br>
&lt;/tr&gt; 
<br>
[/code] 
<br>
2、在urlPattern.properties文件中添加一行：“adminRecommTopics.list.0 =”； 
<br>
 即这个请求action不带参数； 
<br>
<br>
3、在modulesMapping.properties中添加一行：“adminRecommTopics = net.jforum.view.admin.RecommendAction” ； 
<br>
 即为url ：/adminRecommTopics/list请求定义对应的模块文件； 
<br>
<br>
4、在源码包package net.jforum.view.admin中添加模块类：public class RecommendAction extends AdminCommand； 
<br>
[code=java] 
<br>
public class RecommendAction extends AdminCommand { 
<br>
<br>
 public void list() { 
<br>
 this.context.put("topics", DataAccessDriver.getInstance().newTopicDAO().selectRecommWaitingTopics(10)); 
<br>
 this.setTemplateName(TemplateKeys.RECOMMEND_LIST);//新添加的，= "recommend.list"; 
<br>
 } 
<br>
<br>
} 
<br>
[/code] 
<br>
5、在文件：templatesMapping.properties中添加新的模版文件映射关系； 
<br>
 添加一行定义：recommend.list = admin/recommend_list.htm 
<br>
<br>
6、添加模版文件templates/default/admin/recommend_list.htm; 
<br>
[code=html; first-line:1] 
<br>
&lt;#include "header.htm"/&gt; 
<br>
<br>
&lt;form accept-charset="${encoding}" name="form" action="${JForumContext.encodeURL("/jforum")}" method="post"&gt; 
<br>
&lt;input type="hidden" name="action" value="RecommWaitingOpera" /&gt; 
<br>
&lt;input type="hidden" name="module" value="${moduleName}" /&gt; 
<br>
... 
<br>
<br>
[/code] 
<br>
7、SystemGlobals.properties文件中的相关设置项； 
<br>
[code] 
<br>
# If you have freemarker templates residing outside of the JForum webapp 
<br>
# you can add the path to the directory containing them here. 
<br>
# Add the full path to the directory. 
<br>
freemarker.extra.template.path = 
<br>
... 
<br>
# The template to use 
<br>
template.dir = default 
<br>
[/code] 
<br>
8、检查JForumBaseServlet类中初始话freemarker配置过程，没有新更改 
<br>
[code=java;first-line:99] 
<br>
 // Configure the template engine 
<br>
 final Configuration templateCfg = new Configuration(); 
<br>
 templateCfg.setTemplateUpdateDelay(2); 
<br>
 templateCfg.setSetting("number_format", "#"); 
<br>
 templateCfg.setSharedVariable("startupTime", Long.valueOf(System.currentTimeMillis())); 
<br>
<br>
 // Create the default template loader 
<br>
 final String defaultTemplatePath = SystemGlobals.getApplicationPath() + "/templates"; 
<br>
 final FileTemplateLoader defaultLoader = new FileTemplateLoader(new File(defaultTemplatePath)); 
<br>
[/code] 
<br>
 没有弄明白freemarker在处理default/admin/recommend_list.htm和default/forum_show.htm两个模版文件时，用什么规则分别为它们装载不同的包含文件：header.htm？]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1126.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1126.page</link>
				<pubDate><![CDATA[Tue, 2 Aug 2011 14:10:47]]> GMT</pubDate>
				<author><![CDATA[ 十鼎]]></author>
			</item>
			<item>
				<title>回覆:关于开发环境搭建</title>
				<description><![CDATA[ 目前JForum中使用的templates對FreeMarker來說都是使用相對路徑，例如forum_list.htm裡面的&lt;#include "header.htm" /&gt;就是和forum_list.htm同一目錄下的header.htm。 
<br>
可以參考下面這個網址的說明： 
<br>
http://freemarker.sourceforge.net/docs/ref_directive_include.html]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/541/1127.page</guid>
				<link>https://forum.andowson.com/posts/preList/541/1127.page</link>
				<pubDate><![CDATA[Tue, 2 Aug 2011 17:17:12]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
	</channel>
</rss>