From documentation Feign request/response compression, we can enable GZIP for request and response by setting below properties:
feign.compression.request.enabled=true
feign.compression.response.enabled=true
Since you don't have application.yml
(quite strange when you are using spring boot), we can set the programmatically by referring to How can I override Spring Boot application.properties programmatically?.
@SpringBootApplication
public class DemoFeignApplication {
public static void main(String[] args) {
SpringApplication application = new SpringApplication(DemoFeignApplication.class);
Properties properties = new Properties();
properties.put("feign.compression.request.enabled", "true");
properties.put("feign.compression.response.enabled", "true");
application.setDefaultProperties(properties);
application.run(args);
SpringApplication.run(DemoFeignApplication.class, args);
}
}