JAVA-960: Fix conflicts

This commit is contained in:
Krzysiek 2020-03-19 23:06:52 +01:00
parent 25e76cdb88
commit 989c523308
5 changed files with 4 additions and 12 deletions

View File

@ -26,8 +26,4 @@ public class SpringConfig {
return new RestTemplateBuilder(customRestTemplateCustomizer()); return new RestTemplateBuilder(customRestTemplateCustomizer());
} }
@Bean
public RestTemplate restTemplate() {
return new RestTemplate();
}
} }

View File

@ -7,7 +7,7 @@ import com.baeldung.resttemplate.lists.dto.Employee;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@Service @Service("EmployeeListService")
public class EmployeeService public class EmployeeService
{ {
public List<Employee> getAllEmployees() public List<Employee> getAllEmployees()

View File

@ -20,7 +20,7 @@ import com.baeldung.sampleapp.web.dto.Foo;
import com.baeldung.sampleapp.web.exception.ResourceNotFoundException; import com.baeldung.sampleapp.web.exception.ResourceNotFoundException;
@Controller @Controller
@RequestMapping(value = "/foos") @RequestMapping(value = "/foo")
public class MyFooController { public class MyFooController {
private final Map<Long, Foo> myfoos; private final Map<Long, Foo> myfoos;

View File

@ -11,9 +11,4 @@ import org.springframework.web.client.RestTemplate;
@ComponentScan("com.baeldung") @ComponentScan("com.baeldung")
public class SpringTestConfig { public class SpringTestConfig {
@Bean
public RestTemplate restTemplate() {
return new RestTemplate();
}
} }

View File

@ -16,6 +16,7 @@ import org.junit.runner.RunWith;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.http.HttpMethod; import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
@ -28,7 +29,7 @@ import org.springframework.web.client.RestTemplate;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
@RunWith(SpringRunner.class) @RunWith(SpringRunner.class)
@ContextConfiguration(classes = SpringTestConfig.class) @SpringBootTest(classes = SpringTestConfig.class)
public class EmployeeServiceMockRestServiceServerUnitTest { public class EmployeeServiceMockRestServiceServerUnitTest {
private static final Logger logger = LoggerFactory.getLogger(EmployeeServiceMockRestServiceServerUnitTest.class); private static final Logger logger = LoggerFactory.getLogger(EmployeeServiceMockRestServiceServerUnitTest.class);