| | |
| | | package com.ruoyi.common.jackson; |
| | | |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import com.fasterxml.jackson.core.JsonGenerator; |
| | | import com.fasterxml.jackson.databind.BeanProperty; |
| | | import com.fasterxml.jackson.databind.JsonMappingException; |
| | |
| | | @Override |
| | | public void serialize(String value, JsonGenerator gen, SerializerProvider serializers) throws IOException { |
| | | SensitiveService sensitiveService = SpringUtils.getBean(SensitiveService.class); |
| | | if (sensitiveService.isSensitive()) { |
| | | if (ObjectUtil.isNotNull(sensitiveService) && sensitiveService.isSensitive()) { |
| | | gen.writeString(strategy.desensitizer().apply(value)); |
| | | } else { |
| | | gen.writeString(value); |