Skip to content

Commit 1ede692

Browse files
author
muriloalvesdev
committed
bean config to restTemplate
1 parent 404abdb commit 1ede692

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/main/java/br/com/developers/config/ApplicationConfig.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader;
77
import org.springframework.context.annotation.Bean;
88
import org.springframework.context.annotation.Configuration;
9+
import org.springframework.web.client.RestTemplate;
910
import br.com.developers.domain.model.Role;
1011
import br.com.developers.domain.model.RoleName;
1112
import br.com.developers.domain.repository.RoleRepository;
@@ -17,6 +18,12 @@ public class ApplicationConfig {
1718

1819
private RoleRepository roleRepository;
1920

21+
@Bean
22+
public RestTemplate restTemplate() {
23+
return new RestTemplate();
24+
}
25+
26+
2027
@Bean
2128
public void configVelocity() {
2229
Velocity.setProperty(RuntimeConstants.RESOURCE_LOADER, "classpath");

0 commit comments

Comments
 (0)