Closed penumbram-zz closed 7 years ago
microservicedemo.zip uploading the zipped working project, and the guide I used for it is: we shouldn't need the zip. I'll be happy to do the same steps with our project, so if you don't wanna, leave this micro-service part to me. I'll take care of it before saturday. https://spring.io/guides/gs/service-registration-and-discovery/
@okanmenevseoglu @ardaofluoglu @gr3ysky @seydakaradag @skanca
commit fa6e395 has a great difference in terms of the server side.
Now we have micro services, running on an umbrella server. From now on, to run the server on your machine, you have to first run the EurekaCatPluginServerApplication
And when it runs successfully (you can check by visiting localhost:1111) which will show you the following page:
As you can see, the instances currently registered with eureka is empty at the moment. To run an instance, (in our case, we have 2 instances to run on this eureka server, one is the annotation service, and the other is the accounts), you need to run its initializer just like you used to, like:
will run the instance on your port 8080, just like before. You can check by visiting localhost:1111 again, which should show:
Now, you can use the server just like you used to, because now your server is running on port 8080. But if you want to see how the magic happens, run the AccountsService class just like the AnnotationService, in which case you'll see:
two instances running on your server. Now when you visit localhost:8081/accounts, you should see the dummy page:
The two servers run on two different ports so they aren't linked, visiting localhost:8080/accounts for example will not render any meaningful page. As for the front-end developers, you don't need to run the second server for now since we aren't using any functionality from it for now.
somehow managed to make the test app work. the trick is to run the eureka client first, and then run the discovery client