Skip to content

Commit

Permalink
yaml generator --- 값 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
st-yclee committed Sep 13, 2024
1 parent 38a3b8b commit a9e115a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
import com.fasterxml.jackson.dataformat.yaml.YAMLGenerator;
import kr.co.mcmp.api.manifest.k8s.*;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
Expand All @@ -14,7 +15,8 @@
@RequiredArgsConstructor
public class YamlManifestService {

private final ObjectMapper mapper = new ObjectMapper(new YAMLFactory())
private final ObjectMapper mapper = new ObjectMapper(new YAMLFactory()
.disable(YAMLGenerator.Feature.WRITE_DOC_START_MARKER))
.setSerializationInclusion(JsonInclude.Include.NON_NULL);

public String generateYamlDeployments(K8SDeploymentDto deployments) {
Expand Down

0 comments on commit a9e115a

Please sign in to comment.