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

org.openl.rules.ruleservice.spring.SpringConfiguration Maven / Gradle / Ivy

The newest version!
package org.openl.rules.ruleservice.spring;

import org.apache.cxf.transport.common.gzip.GZIPFeature;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import org.openl.spring.config.ConditionalOnEnable;

/**
 * Spring Java configuration for using instead of XML configuration.
 *
 * @author Yury Molchan
 */
@Configuration
public class SpringConfiguration {

    @Bean
    @ConditionalOnEnable("ruleservice.gzip.threshold")
    GZIPFeature gzipFeature(@Value("${ruleservice.gzip.threshold}") Integer gzipThreshold) {
        var gzipFeature = new GZIPFeature();
        gzipFeature.setThreshold(gzipThreshold);
        return gzipFeature;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy