Name:9A8255415053B4DAD16143C2F72EC271, Owner:biggie, Version: 2, Date:2009/12/04 23:35,
简介
本博客系统不需要数据库支持,所有数据全部用XML进行存储。
目前这个系统提供如下功能:
- 多用户博客支持
- 支持附件上传下载
- 模板可换(需自己改)
用户名:admin
密 码:atjava
开发背景
为了方便自己使用而开发。
开发人员
biggie
未完功能
- 检索功能
- 模板管理
- 用户管理模块
已知BUG:
1.当一个月发博超过10的时候首页信息读取不正
解决方法修改BlogManager.java 具体参照如下
- public AxfTitleInfo getTitle(String username,String year,String month) throws AxfException{
- try{
- AxfTitleInfo tinfo = new AxfTitleInfo();
-
- XmlServices services = XmlServices.getInstance();
- String xmlpath = SystemProperty.SYSTEM_REALPATH + File.separator + SystemProperty.BLOGDATA_SAVE_FOLDER + File.separator + username +
- File.separator + year +
- File.separator + month + File.separator +
- DEFAULT_TITLE_FILENAME;
- tinfo = (AxfTitleInfo) services.readXmlFile(xmlpath, tinfo);
-
- List<AxfTitleItemInfo> resultList = tinfo.getContentList();
- for(int i=0;i<resultList.size();i++){
- AxfTitleItemInfo info = resultList.get(i);
- info.setComments(getComments(username, info.getCode(), UtilHelper.formatDateToString(info.getCreatedatetime(), "yyyy"), UtilHelper.formatDateToString(info.getCreatedatetime(), "MM")));
- info.setHits(getHits(username, info.getCode(), UtilHelper.formatDateToString(info.getCreatedatetime(), "yyyy"), UtilHelper.formatDateToString(info.getCreatedatetime(), "MM")));
- }
- resultList = TaxisHelper.sort(resultList,new String[]{"lastupdatetime"},TaxisHelper.DESC_TYPE_DOWN);
- tinfo.setContentList(resultList);
- return tinfo;
- }catch(XmlTransactionException e){
- throw e;
- }catch(Exception e){
- throw new AxfException(e);
- }
- }
- public AxfTitleInfo getTitle(String username,String year,String month) throws AxfException{
- try{
- AxfTitleInfo tinfo = new AxfTitleInfo();
-
- XmlServices services = XmlServices.getInstance();
- String xmlpath = SystemProperty.SYSTEM_REALPATH + File.separator + SystemProperty.BLOGDATA_SAVE_FOLDER + File.separator + username +
- File.separator + year +
- File.separator + month + File.separator +
- DEFAULT_TITLE_FILENAME;
- tinfo = (AxfTitleInfo) services.readXmlFile(xmlpath, tinfo);
-
- List<AxfTitleItemInfo> resultList = tinfo.getContentList();
- for(int i=0;i<resultList.size();i++){
- AxfTitleItemInfo info = resultList.get(i);
- info.setComments(getComments(username, info.getCode(), UtilHelper.formatDateToString(info.getCreatedatetime(), "yyyy"), UtilHelper.formatDateToString(info.getCreatedatetime(), "MM")));
- info.setHits(getHits(username, info.getCode(), UtilHelper.formatDateToString(info.getCreatedatetime(), "yyyy"), UtilHelper.formatDateToString(info.getCreatedatetime(), "MM")));
- }
- resultList = TaxisHelper.sort(resultList,new String[]{"lastupdatetime"},TaxisHelper.DESC_TYPE_DOWN);
- tinfo.setContentList(resultList);
- return tinfo;
- }catch(XmlTransactionException e){
- throw e;
- }catch(Exception e){
- throw new AxfException(e);
- }
- }
复制代码
2.在Blogmanager.java还有一个地方是同样的错误,用同样的方法修改一下就可以了
3.排序处理不正
将TaxisHelper.sort(resultList,new String[]{"lastupdatetime"},TaxisHelper.DESC_TYPE_DOWN);
改成resultList = TaxisHelper.sort(resultList,new String[]{"lastupdatetime"},TaxisHelper.DESC_TYPE_DOWN);
同样,在这个类里还有几处同样的问题, 修改方法与此相同