提交 84219b70 编写于 作者: ibizdev's avatar ibizdev

ibiz4j 发布系统代码

上级 c1bca544
......@@ -468,7 +468,7 @@ public class IBZEmployee extends EntityClient implements Serializable {
if (this.birthday == null) {
return null;
}
SimpleDateFormat sdf = new SimpleDateFormat("defieldFormatStr");
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
return sdf.format(birthday);
}
/**
......
......@@ -135,7 +135,7 @@ public class WFProcessInstance extends EntityClient implements Serializable {
if (this.starttime == null) {
return null;
}
SimpleDateFormat sdf = new SimpleDateFormat("defieldFormatStr");
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
return sdf.format(starttime);
}
/**
......
......@@ -10,6 +10,10 @@ public class CustomJacksonSerializer<T> extends Jackson2JsonRedisSerializer<T>
public static final String DEFAULT_PACKAGE ="[\\w+\\.]+\\.AuthenticationUser";
public static final String CLASSNAME_EX="_$$_";
public static final String CLASSNAME_EX_PATTEN="(_\\$\\$_)(\\w+)";
public static final String USER_PACKAGE= AuthenticationUser.class.getName();
public CustomJacksonSerializer(Class type) {
......@@ -20,6 +24,12 @@ public class CustomJacksonSerializer<T> extends Jackson2JsonRedisSerializer<T>
public T deserialize(byte[] bytes) throws SerializationException {
String serializerContent = new String(bytes, DEFAULT_CHARSET);
Matcher matcher = Pattern.compile(DEFAULT_PACKAGE).matcher(serializerContent);
return matcher.find()?super.deserialize(serializerContent.replaceAll(DEFAULT_PACKAGE,USER_PACKAGE).getBytes()):super.deserialize(bytes);
if(matcher.find()){
serializerContent=serializerContent.replaceAll(DEFAULT_PACKAGE,USER_PACKAGE);
}
if(serializerContent.contains(CLASSNAME_EX)){
serializerContent=serializerContent.replaceAll(CLASSNAME_EX_PATTEN,"");
}
return super.deserialize(serializerContent.getBytes());
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册