更新时间:2022-06-05 17:09:23
I am not saying this is the way to fixed the issue. This is another way of solving the problem.
public class CustomerTest {
final String path = "http://localhost:8080/RestEasy-Spring-MVC-Hibernate/";
ICustomerService proxy = null;
@Before
public void beforeClass(){
ResteasyClient client = new ResteasyClientBuilder().build();
ResteasyWebTarget target = client.target(UriBuilder.fromPath(path));
proxy = target.proxy(ICustomerService.class);
}
@Test
public void testGetallcustomer() throws Exception {
CustomerListType customers = proxy.getAllCustomerInfo();
List<CustomerType> customerTypes = customers.getCustomerType();
for (CustomerType customerType : customerTypes) {
System.out.println("----------------------------------------------------");
System.out.println("Name : "+customerType.getName());
System.out.println("Age : "+customerType.getAge());
System.out.println("CustomerId : "+customerType.getCustomerId());
}
}
}
JsonMappingException:无法从START_OBJECT标记中反序列化java.lang.Integer的实例
org.codehaus.jackson.map.JsonMappingException:无法将java.util.ArrayList的实例反序列化为START_OBJECT标记
jackson kotlin-无法从START_OBJECT令牌中反序列化`java.util.ArrayList`的实例
JSON 反序列化抛出异常 - 无法从 START_OBJECT 令牌反序列化 java.util.ArrayList 的实例
收到“错误":“内部错误";在邮递员上并且遇到错误无法从START_OBJECT令牌中反序列化java.util.ArrayList的实例