.
This commit is contained in:
@@ -29,6 +29,9 @@ public class BaseServlet extends HttpServlet {
|
||||
@Resource
|
||||
protected UserService userService;
|
||||
|
||||
/*@Resource(name = "redis")
|
||||
protected RedisCacheSource<String> cache;*/
|
||||
|
||||
private HttpRequest request;
|
||||
private HttpResponse response;
|
||||
private static final Kv _kv = Kv.create();
|
||||
@@ -53,6 +56,10 @@ public class BaseServlet extends HttpServlet {
|
||||
_kv.set("mine", request.currentUser());
|
||||
}
|
||||
|
||||
/*cache.set("a", "ABC");
|
||||
String a = cache.get("a");
|
||||
System.out.println(a);*/
|
||||
|
||||
this.request = request;
|
||||
this.response = response;
|
||||
String uri = request.getRequestURI();
|
||||
|
@@ -29,7 +29,7 @@ public class EJ {
|
||||
/*EJ ej = new EJ();
|
||||
|
||||
System.out.println(ej.date(1511682960591L));*/
|
||||
List<Kv> list = asList(
|
||||
/*List<Kv> list = asList(
|
||||
Kv.by("k", 1).set("a", "1+1=?").set("q", 2)
|
||||
, Kv.by("k", 2).set("a", "1*1=?").set("q", 1)
|
||||
, Kv.by("k", 3).set("a", "3+2-5=?").set("q", 0)
|
||||
@@ -41,7 +41,7 @@ public class EJ {
|
||||
|
||||
System.out.println(System.currentTimeMillis());
|
||||
System.out.println(kv.toString());
|
||||
System.out.println(kv.getStr("q").equals("0"));
|
||||
System.out.println(kv.getStr("q").equals("0"));*/
|
||||
|
||||
}
|
||||
|
||||
|
@@ -25,7 +25,7 @@ public class FileService extends BaseService {
|
||||
String name = tmpFile.getName();
|
||||
String suffix = name.substring(name.lastIndexOf("."));
|
||||
String path = String.format(format, System.currentTimeMillis()) + suffix;
|
||||
File destFile = new File((winos ? "E:/wk/_own/bbs/root/tem/" : dir) + path);
|
||||
File destFile = new File((winos ? "E:/wk/redbbs/root/tem/" : dir) + path);
|
||||
destFile.getParentFile().mkdir();
|
||||
if (!tmpFile.renameTo(destFile)){
|
||||
try{
|
||||
|
Reference in New Issue
Block a user