I am new to Client side of microservice architecture. I am building a rest based client to submit mine form data using above piece of code.
public ResponseEntity<?> saveCustomerInfo(RegisterCustomer customerModel) {
RestTemplate restTemp = new RestTemplate();
String url= "http://localhost:8081/applicationDemo/saveCustInfo";
HttpEntity http = new HttpEntity(customerModel);
System.out.println(customerModel);
ResponseEntity resp =
restTemp.postForEntity(url,http,ResponseEntity.class);
System.out.println(resp.getBody());
return null;
When i test above code using POSTMAN , it show exception as given below :
org.springframework.web.client.HttpClientErrorException: 415 null
I am not able to get what is gone wrong because when i hit micro services without client, it save the data.But when i use this Rest Template based method, it shows above exception.