2017-06-20 19:09

如果用的较多, 直接怼到 Handler 中.....

2017-06-17 10:44

@qiuzhiwei java final 哈哈还有海哥的 afinal = android final 都是我喜欢的

2017-06-17 10:38

< ?xml version="1.0" encoding="UTF-8"? >
< Books >
#for(x : blogPage.getList())
< book >
< id >#(x.id)< /id >
< title >#(x.title)< /title >
< /book >
#end
< /Books >

2017-06-17 10:37

public class IndexController extends Controller {

static BlogService service = new BlogService();

public void index() {
// render("index.html");
setAttr("blogPage", service.paginate(getParaToInt(0, 1), 10));
render(new XmlRender("books.xml"));
}
}

语法是Template魔版
books.xml 文件:



#for(x : blogPage.getList())

#(x.id)
#(x.title)

#end

2017-06-11 10:41

如果一次发送多条的话就多add几次
outMsg.addNews(title, msg.toString(), null, url);//第一个是消息大图
outMsg.addNews(title, msg.toString(), null, url);
outMsg.addNews(title, msg.toString(), null, url);
outMsg.addNews(title, msg.toString(), null, url);

它里面是个集合:
private List articles = new ArrayList();

2017-06-11 10:32

菜单我一般喜欢这样写:
/**
* 实现父类抽方法,处理自定义菜单事件
*/
protected void processInMenuEvent(InMenuEvent inMenuEvent)
{
log.debug("菜单事件:" + inMenuEvent.getFromUserName());


String eventKey = inMenuEvent.getEventKey();

String title = "菜单信息编码 : " + eventKey;
//详细信息的地址
String url = null;

StringBuilder msg = new StringBuilder();
switch (eventKey) {
case "110":
title = "帮助";
msg.append("您好! 有什么可以帮助您的了? 直接回复文字内容即可稍候回复您");
url = "http://www.jfinal.com";//我一般放H5的地址
break;

case "111":
title = "XXXX";
//msg xxx
break;


default:
msg.append("\\(^_^)/ 正在开发中 ... ");
break;
}



OutNewsMsg outMsg = new OutNewsMsg(inMenuEvent);
outMsg.addNews(title, msg.toString(), null, url);
render(outMsg);
}

2017-06-11 10:26

我用的 1.9 (1.8 也是这样写)
OutNewsMsg outMsg = new OutNewsMsg(inMenuEvent);
outMsg.addNews("标题", "就是好用", null, "http://www.jfinal.com");
render(outMsg);

你先把上面的各种菜单判断,注掉, 放上上面这个感觉一下

2017-06-10 16:48

默认值:
// 初始连接池大小、最小空闲连接数、最大活跃连接数
private int initialSize = 10;
private int minIdle = 10;
private int maxActive = 100;

2017-06-10 16:45

比如使用的Druid:
查看com.jfinal.plugin.druid;下的DruidPlugin
提供了:// 初始连接池大小、最小空闲连接数、最大活跃连接数
public DruidPlugin set(int initialSize, int minIdle, int maxActive) {
this.initialSize = initialSize;
this.minIdle = minIdle;
this.maxActive = maxActive;
return this;
}
设置1也可以的,

2017-06-10 15:07

@huiyuanming1002 不贴代码的错误都是耍流氓哈哈

2017-06-09 22:44

无外乎就是: 微信后台URL挂参的appId错误, 或者后台的appsecret没有配置正确

2017-06-08 22:30

@yjjdick1990 http://www.jfinal.com/club/join

2017-06-07 19:32

@没蓝开打 我是才学的, 用了很多线程去跑也没有这个情况啊,
大概1分钟左右就完事了
http://www.jfinal.com/share/299

2017-05-28 20:18

@JFinal 感谢老大指点~ 已经修改了~ 再去看看红薯教主的j2cache