2018-05-31 20:26

先在main方法里面试试
http://www.jfinal.com/doc/8-4

2018-05-31 20:17

去掉 main.id 再 save

2018-05-31 20:08

资源使用绝对路径 /开头

2018-05-31 11:36

https://www.baidu.com/s?ie=UTF-8&wd=eclipse%20debug

debug

2018-05-31 11:35

https://www.baidu.com/s?ie=utf-8&f=8&rsv_bp=1&tn=baidu&wd=java%20%E5%BC%82%E6%AD%A5%20%E6%89%A7%E8%A1%8C

2018-05-30 19:50

public List getMongoId() {
return get("mongoId");
}

2018-05-30 16:42

我有一把锤子, 贼好使: http://www.jfinal.com/share/639

2018-05-30 09:28

@libofei 开源社区里搜索这两个框架的名字, 空格隔开, 就能收到很多事例了.
@小徐同学 老师给的例子:
https://my.oschina.net/u/1168934/blog/864239

2018-05-29 22:25

@libofei http://maven.aliyun.com/nexus/#nexus-search;quick~tio-websocket-server

2018-05-29 21:01

@libofei 看官网嘛! 没什么可比的, 自己看看代码, 看喜欢哪个风格, 这些框架对于业务来说都能实现, 就看用的爽不爽了 ......
https://t-io.org/blog/index.html?p=%2Fblog%2Ftio%2Fws%2Fshowcase.html

2018-05-29 18:31

@耿少卿 你看源码中取值的代码就知道了

public static String getWebRootPath() {
if (webRootPath == null) {
webRootPath = detectWebRootPath();
}
return webRootPath;
}
// 注意:命令行返回的是命令行所在路径的上层的上层路径
private static String detectWebRootPath() {
try {
String path = PathKit.class.getResource("/").toURI().getPath();
return new File(path).getParentFile().getParentFile().getCanonicalPath();
} catch (Exception e) {
throw new RuntimeException(e);
}
}

看是根据 class 文件定位的, 所以说, 代码在哪里, 返回的根路径就是哪里了

2018-05-26 09:54

@libofei 现在开源社的 百万级TCP长连接框架 t-io 啊! 作者谭总人缘又好, 和jfinal联合使用还非常棒! https://www.oschina.net/news/96405/t-io-3-0-0-released

2018-05-25 21:39

常用Kit:
AesKit.class
Base64Kit.class
ElKit.class
FileKit.class
HandlerKit.class
HashKit.class
HttpKit.class
ImageKit.class
JavaKeyword.class
JsonKit.class
Kv.class
LogKit.class
Okv.class
PathKit.class
Prop.class
PropKit.class
ReflectKit.class
Ret.class
StrKit.class

2018-05-25 21:37

那恭喜你获得一个新手礼包:
/**
* Okv (Ordered Key Value)
*
* Okv 与 Kv 的唯一区别在于 Okv 继承自 LinkedHashMap,而 Kv 继承自 HashMap
* 所以对 Okv 中的数据进行迭代输出的次序与数据插入的先后次序一致
*
* Example:
* Okv para = Okv.by("id", 123);
* User user = user.findFirst(getSqlPara("find", para));
*/