解决已知的bug

This commit is contained in:
Dftre 2024-05-09 01:56:37 +08:00
parent 9db38aea58
commit 10f2cc6d8a
3 changed files with 6 additions and 6 deletions

View File

@ -10,6 +10,7 @@ import com.alibaba.fastjson2.JSONReader;
import com.alibaba.fastjson2.JSONWriter; import com.alibaba.fastjson2.JSONWriter;
// import com.alibaba.fastjson2.filter.Filter; // import com.alibaba.fastjson2.filter.Filter;
import com.alibaba.fastjson2.filter.Filter; import com.alibaba.fastjson2.filter.Filter;
import com.ruoyi.common.constant.Constants;
/** /**
* Redis使用FastJson序列化 * Redis使用FastJson序列化
@ -20,10 +21,7 @@ public class FastJson2JsonRedisSerializer<T> implements RedisSerializer<T>
{ {
public static final Charset DEFAULT_CHARSET = Charset.forName("UTF-8"); public static final Charset DEFAULT_CHARSET = Charset.forName("UTF-8");
static final Filter autoTypeFilter = JSONReader.autoTypeFilter( static final Filter AUTO_TYPE_FILTER = JSONReader.autoTypeFilter(Constants.JSON_WHITELIST_STR);
"org.springframework.security.core.authority.SimpleGrantedAuthority",
"com.ruoyi.***"
);
private Class<T> clazz; private Class<T> clazz;
@ -51,6 +49,6 @@ public class FastJson2JsonRedisSerializer<T> implements RedisSerializer<T>
return null; return null;
} }
String str = new String(bytes, DEFAULT_CHARSET); String str = new String(bytes, DEFAULT_CHARSET);
return JSON.parseObject(str, clazz, autoTypeFilter); return JSON.parseObject(str, clazz, AUTO_TYPE_FILTER);
} }
} }

View File

@ -126,7 +126,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="selectGenTableByName" parameterType="String" resultMap="GenTableResult"> <select id="selectGenTableByName" parameterType="String" resultMap="GenTableResult">
SELECT t.table_id, t.table_name, t.table_comment, t.sub_table_name, t.sub_table_fk_name, t.class_name, t.tpl_category, t.tpl_web_type, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.gen_type, t.gen_path, t.options, t.remark, SELECT t.table_id, t.table_name, t.table_comment, t.sub_table_name, t.sub_table_fk_name, t.class_name, t.tpl_category, t.tpl_web_type, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.gen_type, t.gen_path, t.options, t.remark,t.have_sub_column,
c.column_id, c.column_name, c.column_comment, c.column_type, c.java_type, c.java_field, c.is_pk, c.is_increment, c.is_required, c.is_insert, c.is_edit, c.is_list, c.is_query, c.query_type, c.html_type, c.dict_type, c.sort,c.sub_column_table_name,c.sub_column_fk_name,c.sub_column_name,c.sub_column_java_type,c.sub_column_java_field c.column_id, c.column_name, c.column_comment, c.column_type, c.java_type, c.java_field, c.is_pk, c.is_increment, c.is_required, c.is_insert, c.is_edit, c.is_list, c.is_query, c.query_type, c.html_type, c.dict_type, c.sort,c.sub_column_table_name,c.sub_column_fk_name,c.sub_column_name,c.sub_column_java_type,c.sub_column_java_field
FROM gen_table t FROM gen_table t
LEFT JOIN gen_table_column c ON t.table_id = c.table_id LEFT JOIN gen_table_column c ON t.table_id = c.table_id

View File

@ -8,6 +8,7 @@ import org.ehcache.core.EhcacheBase;
import org.ehcache.impl.internal.concurrent.ConcurrentHashMap; import org.ehcache.impl.internal.concurrent.ConcurrentHashMap;
import org.ehcache.impl.internal.store.heap.OnHeapStore; import org.ehcache.impl.internal.store.heap.OnHeapStore;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.cache.Cache; import org.springframework.cache.Cache;
import org.springframework.cache.jcache.JCacheCache; import org.springframework.cache.jcache.JCacheCache;
import org.springframework.cache.jcache.JCacheCacheManager; import org.springframework.cache.jcache.JCacheCacheManager;
@ -17,6 +18,7 @@ import com.ruoyi.common.interceptor.cache.CacheKeys;
import com.ruoyi.common.interceptor.cache.CacheNoTimeOut; import com.ruoyi.common.interceptor.cache.CacheNoTimeOut;
@Component @Component
@ConditionalOnProperty(prefix = "spring.cache", name = { "type" }, havingValue = "jcache", matchIfMissing = false)
public class Ehcache3Cache implements CacheNoTimeOut, CacheKeys { public class Ehcache3Cache implements CacheNoTimeOut, CacheKeys {
@Autowired @Autowired