All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.powsybl.ws.commons.computation.ComputationConfig Maven / Gradle / Ivy

There is a newer version: 1.19.0
Show newest version
package com.powsybl.ws.commons.computation;

import com.fasterxml.jackson.databind.InjectableValues;
import com.powsybl.commons.report.ReportNodeDeserializer;
import com.powsybl.commons.report.ReportNodeJsonModule;
import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ComputationConfig {
    @Bean
    public Jackson2ObjectMapperBuilderCustomizer jsonCustomizer() {
        return builder -> builder.modulesToInstall(new ReportNodeJsonModule())
                .postConfigurer(objMapper -> objMapper.setInjectableValues(new InjectableValues.Std().addValue(ReportNodeDeserializer.DICTIONARY_VALUE_ID, null)));
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy