mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-03-08 07:41:09 +08:00
fix 修复 jackson createContextual 用法不标准导致可能出现的并发问题(https://gitee.com/dromara/RuoYi-Cloud-Plus/issues/IFAM5Z)
This commit is contained in:
@@ -29,6 +29,15 @@ public class SensitiveHandler extends JsonSerializer<String> implements Contextu
|
||||
private final String[] roleKey;
|
||||
private final String[] perms;
|
||||
|
||||
/**
|
||||
* 提供给 jackson 创建上下文序列化器时使用 不然会报错
|
||||
*/
|
||||
public SensitiveHandler() {
|
||||
this.strategy = null;
|
||||
this.roleKey = null;
|
||||
this.perms = null;
|
||||
}
|
||||
|
||||
public SensitiveHandler(SensitiveStrategy strategy, String[] strings, String[] perms) {
|
||||
this.strategy = strategy;
|
||||
this.roleKey = strings;
|
||||
|
||||
@@ -33,6 +33,13 @@ public class TranslationHandler extends JsonSerializer<Object> implements Contex
|
||||
|
||||
private final Translation translation;
|
||||
|
||||
/**
|
||||
* 提供给 jackson 创建上下文序列化器时使用 不然会报错
|
||||
*/
|
||||
public TranslationHandler() {
|
||||
this.translation = null;
|
||||
}
|
||||
|
||||
public TranslationHandler(Translation translation) {
|
||||
this.translation = translation;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user