Skip to content

KenavR/spring-boot-microservices-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spring-boot-microservices-example

This implementation includes a simple example for a spring boot microservice structure and a cross service REST request using RestTemplate. The registration at Eureka works as intended but the request produces an error.

eureka

Start

  1. Start GatewayApplication
  2. Start PublicAPIApplication
  3. Start MyServiceApplication
  4. Access http://localhost:2222/service/test

Error

This produces the following error

  Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed;
  nested exception is org.springframework.web.client.ResourceAccessException: I/O error on POST request for "http://MY-SERVICE/test": MY-SERVICE;
  nested exception is java.net.UnknownHostException: MY-SERVICE] with root cause

Stackoverflow Question

http://stackoverflow.com/questions/37159662/microservices-resttemplate-unknownhostexception

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages