InvokingSecurityInfo invokingSecurityInfo; ObjectMapper objectMapper = new ObjectMapper(); List<String> userAccountList=new ArrayList<>();
//將實體類存成字符串 invokingSecurityInfo = invokingSecurityUtil.invokingSecurityInfoRepository.getFirstByAvaiStatus(1); String a=new ObjectMapper().writeValueAsString(invokingSecurityInfo)
//將實體類存成字符串 JavaType javaType =objectMapper.getTypeFactory().constructParametricType(ArrayList.class, String.class); userAccountList = objectMapper.readValue(invokingSecurityUtil.redisService.get(INVOKING_USER_ACCOUNT).toString(), javaType);