2020-07-13 12:32
@zzutligang 你没加入 jfinal 俱乐部,搞微信支付当然就累了。
支付这种代码在 jfinal 俱乐部都是现成的, 我亲手写的代码,拿来即用
2020-07-10 14:30
你配置了下面这两个东东:
me.setToClassPathSourceFactory();
me.setSourceFactory(new MyClassPathSourceFactory());
其中第二个配置会覆盖掉第一个配置,因为这两个都是在配置 SoruceFactory
此外,如果你的模板在 classpath:templates文件中,可以这样配置:
me.setBaseTemplatePath("/templates");
me.setToClassPathSourceFactory();
然后用的时候就可以省去 "/templates" 目录,例如:
render("/index.html");
2020-07-10 11:54
先试试这个:
UndertowServer.create(...)
.configWeb(web -> {
web.addListener("...");
web.addInitParameter("...", "...");
})
.start();
如果上面这个不行,试一下这个:
UndertowServer.create(...)
.configWeb(web -> {
DeploymentInfo di = web.getDeploymentInfo();
di.xxx(...); // 这里调用 di 内的一些方法尝试实现功能
})
.start();
先通过 web.getDeploymentInfo() 获取到一个 DeploymentsInfo 对象,然对所有配置都可以通过这个对象中的方法来配置