Skip to content

Commit

Permalink
Define bean RestTemplate
Browse files Browse the repository at this point in the history
Fixes #306
  • Loading branch information
micheljung committed Mar 19, 2019
1 parent 696f580 commit 533a5d4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
14 changes: 14 additions & 0 deletions src/main/java/com/faforever/api/config/WebHookConfig.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.faforever.api.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

@Configuration
public class WebHookConfig {

@Bean
public RestTemplate restTemplate() {
return new RestTemplate();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream;
import org.springframework.context.annotation.Lazy;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import org.springframework.util.Assert;
import org.springframework.web.client.RestClientException;
Expand Down Expand Up @@ -56,7 +57,7 @@
*/
@Slf4j
@Component
@Lazy
@Scope(BeanDefinition.SCOPE_PROTOTYPE)
public class LegacyFeaturedModDeploymentTask implements Runnable {

private static final String NON_WORD_CHARACTER_PATTERN = "[^\\w]";
Expand Down

0 comments on commit 533a5d4

Please sign in to comment.