diff --git a/modules/i3plus-core-apiservice/src/main/java/cn/estsh/i3plus/core/apiservice/controller/base/WhiteController.java b/modules/i3plus-core-apiservice/src/main/java/cn/estsh/i3plus/core/apiservice/controller/base/WhiteController.java index 6910a76..f2d6c05 100644 --- a/modules/i3plus-core-apiservice/src/main/java/cn/estsh/i3plus/core/apiservice/controller/base/WhiteController.java +++ b/modules/i3plus-core-apiservice/src/main/java/cn/estsh/i3plus/core/apiservice/controller/base/WhiteController.java @@ -42,6 +42,8 @@ import cn.estsh.impp.framework.boot.license.serviceimpl.ImppLicenseDecoder; import cn.estsh.impp.framework.boot.util.*; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; +import com.alibaba.fastjson.parser.ParserConfig; +import com.alibaba.fastjson.serializer.SerializerFeature; import com.aliyun.dingtalkoauth2_1_0.models.GetAccessTokenRequest; import com.aliyun.dingtalkoauth2_1_0.models.GetAccessTokenResponse; import com.aliyun.dingtalkrobot_1_0.models.BatchSendOTOHeaders; @@ -1068,6 +1070,38 @@ public class WhiteController extends CoreBaseController { } + /** + * 获取fastJosn配置并测试 + * @return + */ + @GetMapping(value = "/fastjson") + @ApiOperation(value = "获取fastJosn配置", notes = "获取fastJosn配置") + public ResultBean getFastJosnConfig() { + ParserConfig config = ParserConfig.getGlobalInstance(); + SysUser model = new SysUser(); + + model.setUserLoginName("test"); + Map resultMap = new HashMap<>(); + try { + String json = JSON.toJSONString(model, SerializerFeature.WriteClassName); + resultMap.put("json",json); + JSON.parse(json); + resultMap.put("parseredJosn",json); + + resultMap.put("config",JSON.toJSONString(config)); + } catch (Exception e) { + e.printStackTrace(); + if (e.getCause() != null){ + resultMap.put("error",e.getCause().getMessage()); + }else { + resultMap.put("error",e.getMessage()); + } + } + return ResultBean.success().setResultMap(resultMap); + } + + + private static final Long ACCESS_TOKEN_EXPIRE_TIME = 7080L; private static final String ACCESS_TOKEN_KEY = "ding_talk:access_token"; diff --git a/pom.xml b/pom.xml index 06760ef..69a5208 100644 --- a/pom.xml +++ b/pom.xml @@ -296,12 +296,19 @@ + + + + + + com.alibaba fastjson - 1.2.8 + 1.2.80 + net.sf.ehcache