Merge pull request #10515 from freelansam/JAVA-4611
JAVA-4611: Update deprecations in spring-boot-rest module
This commit is contained in:
commit
5eeccb19cd
|
@ -50,7 +50,7 @@ public class CustomerController {
|
|||
}
|
||||
|
||||
Link link = linkTo(methodOn(CustomerController.class).getOrdersForCustomer(customerId)).withSelfRel();
|
||||
CollectionModel<Order> result = new CollectionModel<>(orders, link);
|
||||
CollectionModel<Order> result = CollectionModel.of(orders, link);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ public class CustomerController {
|
|||
}
|
||||
|
||||
Link link = linkTo(CustomerController.class).withSelfRel();
|
||||
CollectionModel<Customer> result = new CollectionModel<>(allCustomers, link);
|
||||
CollectionModel<Customer> result = CollectionModel.of(allCustomers, link);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ public class ExamplePostControllerRequestIntegrationTest {
|
|||
|
||||
@Before
|
||||
public void preTest() {
|
||||
MockitoAnnotations.initMocks(this);
|
||||
MockitoAnnotations.openMocks(this);
|
||||
mockMvc = MockMvcBuilders
|
||||
.standaloneSetup(exampleController)
|
||||
.build();
|
||||
|
|
|
@ -34,7 +34,7 @@ public class ExamplePostControllerResponseIntegrationTest {
|
|||
|
||||
@Before
|
||||
public void preTest() {
|
||||
MockitoAnnotations.initMocks(this);
|
||||
MockitoAnnotations.openMocks(this);
|
||||
mockMvc = MockMvcBuilders
|
||||
.standaloneSetup(exampleController)
|
||||
.build();
|
||||
|
|
|
@ -8,12 +8,10 @@ import org.springframework.boot.test.context.SpringBootTest;
|
|||
import org.springframework.http.MediaType;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
import org.springframework.test.web.servlet.MockMvc;
|
||||
import org.springframework.web.server.MediaTypeNotSupportedStatusException;
|
||||
|
||||
import com.baeldung.web.controller.students.Student;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.delete;
|
||||
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
|
||||
|
|
Loading…
Reference in New Issue