|
@@ -1,11 +1,16 @@
|
|
|
package com.jkcredit.sysnews.util;
|
|
|
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import javax.annotation.PostConstruct;
|
|
|
import java.io.File;
|
|
|
+import java.text.ParseException;
|
|
|
+import java.text.ParsePosition;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
import java.util.ArrayList;
|
|
|
+import java.util.Date;
|
|
|
import java.util.List;
|
|
|
import java.util.Set;
|
|
|
|
|
@@ -16,6 +21,7 @@ import java.util.Set;
|
|
|
* @version: V1.0
|
|
|
**/
|
|
|
@Component
|
|
|
+@Slf4j
|
|
|
public class CommonUtil {
|
|
|
@Value("${photo.accessPath}")
|
|
|
private String accessPath;
|
|
@@ -49,4 +55,9 @@ public class CommonUtil {
|
|
|
String url = ACCESS_PATH + ACCESS_RESOURCE + photoUrlArgs[1] + File.separator + photoUrlArgs[2];
|
|
|
return url;
|
|
|
}
|
|
|
+
|
|
|
+ public static String dateFormat(Date time) {
|
|
|
+ SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
+ return formatter.format(time);
|
|
|
+ }
|
|
|
}
|