work out bug

This commit is contained in:
D 2024-04-18 09:09:24 +08:00
parent 323766a218
commit 4ebb288d46
6 changed files with 13 additions and 12 deletions

View File

@ -400,7 +400,7 @@ public class ExcelUtil<T>
Object val = this.getCellValue(row, entry.getKey());
// 如果不存在实例则新建.
entity = (entity == null ? clazz.newInstance() : entity);
entity = (entity == null ? clazz.getDeclaredConstructor().newInstance() : entity);
// 从map中得到对应列的field.
Field field = (Field) entry.getValue()[0];
Excel attr = (Excel) entry.getValue()[1];
@ -1320,7 +1320,7 @@ public class ExcelUtil<T>
{
try
{
Object instance = excel.handler().newInstance();
Object instance = excel.handler().getDeclaredConstructor().newInstance();
Method formatMethod = excel.handler().getMethod("format", new Class[] { Object.class, String[].class, Cell.class, Workbook.class });
value = formatMethod.invoke(instance, value, excel.args(), cell, this.wb);
}

View File

@ -1,8 +1,10 @@
package com.ruoyi.framework.config;
import java.nio.charset.Charset;
import org.springframework.data.redis.serializer.RedisSerializer;
import org.springframework.data.redis.serializer.SerializationException;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONReader;
import com.alibaba.fastjson2.JSONWriter;
@ -49,7 +51,7 @@ public class FastJson2JsonRedisSerializer<T> implements RedisSerializer<T>
}
String str = new String(bytes, DEFAULT_CHARSET);
// TODO 自动类型官方说不安全所以弃用了代替方案是autoTypeFilter
// TODO 自动类型官方说不安全所以弃用了代替方案是autoTypeFilter,在注释中给了案例
return JSON.parseObject(str, clazz, JSONReader.Feature.SupportAutoType);
// return JSON.parseObject(str, clazz, autoTypeFilter);
}

View File

@ -7,7 +7,7 @@ import me.zhyd.oauth.request.AuthAlipayRequest;
import me.zhyd.oauth.request.AuthAliyunRequest;
import me.zhyd.oauth.request.AuthBaiduRequest;
import me.zhyd.oauth.request.AuthCodingRequest;
import me.zhyd.oauth.request.AuthCsdnRequest;
// import me.zhyd.oauth.request.AuthCsdnRequest;
import me.zhyd.oauth.request.AuthDingTalkRequest;
import me.zhyd.oauth.request.AuthDouyinRequest;
import me.zhyd.oauth.request.AuthElemeRequest;
@ -88,10 +88,10 @@ public class AuthUtils
authRequest = new AuthWeChatOpenRequest(AuthConfig.builder().clientId(clientId)
.clientSecret(clientSecret).redirectUri(redirectUri).build(), authStateCache);
break;
case "csdn":
authRequest = new AuthCsdnRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret)
.redirectUri(redirectUri).build(), authStateCache);
break;
// case "csdn":
// authRequest = new AuthCsdnRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret)
// .redirectUri(redirectUri).build(), authStateCache);
// break;
case "taobao":
authRequest = new AuthTaobaoRequest(AuthConfig.builder().clientId(clientId).clientSecret(clientSecret)
.redirectUri(redirectUri).build(), authStateCache);

View File

@ -45,6 +45,7 @@ public class OnLineController extends BaseController {
@Autowired
private SqlSessionFactory sqlSessionFactory;
@SuppressWarnings("unchecked")
public Map<String, Object> getParams(HashMap<String, Object> params, HashMap<String, Object> data) {
Map<String, Object> object = new HashMap<>();
HashMap<String, Object> object_params = new HashMap<String, Object>();

View File

@ -244,7 +244,7 @@ public class SqlMapper {
private MSUtils(Configuration configuration) {
this.configuration = configuration;
languageDriver = configuration.getDefaultScriptingLanuageInstance();
languageDriver = configuration.getDefaultScriptingLanguageInstance();
}
/**

View File

@ -101,7 +101,7 @@ public class HttpUtil {
public static String doGet(String url,String parameter)
{
String uriAPI =url+"?"+parameter ; //"http://XXXXX?str=I+am+get+String";
String uriAPI =url+"?"+parameter ; //"http://XX?str=I+am+get+String";
String result= "";
HttpClient client = createSSLClientDefault();
HttpGet httpRequst = new HttpGet(uriAPI);
@ -118,11 +118,9 @@ public class HttpUtil {
else
httpRequst.abort();
} catch (ClientProtocolException e) {
// TODO Auto-generated catch block
e.printStackTrace();
result = e.getMessage().toString();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
result = e.getMessage().toString();
}