0

Currently, I'm trying to create a small example project with a micro service architecture in Java to learn the basic concepts. I am using the following tutorials: tutorial1, tutorial2. In there it is mentioned that you have to configure an application.yml or application.properties file. But I don't know where I should put these files. And I couldn't find a clean project structure example for microservices with Java.

So my questions are: Is there a common project structure for micro services in Java with the mentioned frameworks?

Where should I put the application.yml and could someone give me a full example of the file? (can be very basic. I only need a pattern)

Could you pm me some good/better tutorials? (this would be opinion based. So that's why I'm asking for a pm)

Thanks for possible answers.

Grinish Nepal
  • 3,037
  • 3
  • 30
  • 49
  • 1
    This SO give a short answer http://stackoverflow.com/questions/39784719/maven-archetype-to-create-micro-service-application – Issam El-atif Mar 29 '17 at 09:03

1 Answers1

1

A couple of places for you to take a look at:-

https://start.spring.io/ -This will help you generate the project quick and fast.

https://github.com/spring-cloud-samples - Here you could find the samples to look at.

Also, learn a little bit on spring-boot since you want to use spring-cloud. Here is the link https://projects.spring.io/spring-boot/

For the question on your application.yml vs application.properties it's up to you what you want to use. The properties/yml file go in the resource folder in case you get confused. In case cloud-config is being used then it is externalised though the bootstrap.yml stays in the resource folder. The samples link should give you enough examples to understand the structure or else create a project using the first link which comes with the structure then you can play with it.

I hope this helps.

Grinish Nepal
  • 3,037
  • 3
  • 30
  • 49