diff --git a/boot/platform/src/main/java/com/platform/boot/commons/base/AbstractDatabase.java b/boot/platform/src/main/java/com/platform/boot/commons/base/AbstractDatabase.java index b9749f2b..1f07657f 100644 --- a/boot/platform/src/main/java/com/platform/boot/commons/base/AbstractDatabase.java +++ b/boot/platform/src/main/java/com/platform/boot/commons/base/AbstractDatabase.java @@ -155,7 +155,9 @@ protected Mono countWithCache(Object key, Mono sourceMono) { private void cachePut(String cacheKey, Object obj) { DataSize objectSize = com.platform.boot.commons.utils.BeanUtils.getBeanSize(obj); if (objectSize.toBytes() > maxInMemorySize.toBytes()) { - throw RestServerException.withMsg("Object size ", ""); + throw RestServerException.withMsg("Object size is too large.", + "Object size is too large, max size is " + maxInMemorySize.toBytes() + "," + + " Object size is " + objectSize.toBytes() + "."); } this.cache.put(cacheKey, obj); } diff --git a/boot/platform/src/main/java/com/platform/boot/commons/utils/BeanUtils.java b/boot/platform/src/main/java/com/platform/boot/commons/utils/BeanUtils.java index 82462c9b..cb566078 100644 --- a/boot/platform/src/main/java/com/platform/boot/commons/utils/BeanUtils.java +++ b/boot/platform/src/main/java/com/platform/boot/commons/utils/BeanUtils.java @@ -19,8 +19,8 @@ * @author Alex bob */ public class BeanUtils { - private static final ByteArrayOutputStream BYTE_ARRAY_OUTPUT_STREAM = new ByteArrayOutputStream(); - private static final ObjectOutputStream OBJECT_OUTPUT_STREAM; + private final static ByteArrayOutputStream BYTE_ARRAY_OUTPUT_STREAM = new ByteArrayOutputStream(); + private final static ObjectOutputStream OBJECT_OUTPUT_STREAM; static { try { diff --git a/boot/platform/src/main/java/com/platform/boot/commons/utils/ContextUtils.java b/boot/platform/src/main/java/com/platform/boot/commons/utils/ContextUtils.java index 9a82a9c6..05a7b12b 100644 --- a/boot/platform/src/main/java/com/platform/boot/commons/utils/ContextUtils.java +++ b/boot/platform/src/main/java/com/platform/boot/commons/utils/ContextUtils.java @@ -29,8 +29,8 @@ @Log4j2 @Component public final class ContextUtils implements Serializable { - public static final String CSRF_TOKEN_CONTEXT = "CSRF_TOKEN_CONTEXT"; - public static final String SECURITY_AUTH_TOKEN_HEADER = "X-Auth-Token"; + public final static String CSRF_TOKEN_CONTEXT = "CSRF_TOKEN_CONTEXT"; + public final static String SECURITY_AUTH_TOKEN_HEADER = "X-Auth-Token"; public static ObjectMapper OBJECT_MAPPER; public static Snowflake SNOW_FLAKE; public static UsersService USERS_SERVICE;