java - Test case in spring boot(mockmvc) not supporting Resttemplate -


i using mock mvc in test case , working fine (with out start full http server). if use resttemplate in service controller communicating service coming 'unknown host exception' while running test case. service spring boot application , registered in eureka server.

my code this

@autowired private resttemplate participantsresttemplate; string url = "http://account-micro-service/api/account/accounts.json"; resttemplate.exchange(url, httpmethod.post, body, string.class); 

'account-micro-service' service name service registered in eureka server


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -