DEV Community

Discussion on: Spring Cloud Config Server: Step by Step

 
hendisantika profile image
Hendi Santika

I will add you to my gitlab group so that You can clone.
May I know your gitlab account?

Thanks

Thread Thread
 
markbdsouza profile image
Mark Dsouza

Thanks tried setting it up on my local and Your yml files seem to be causing the issue. Im not sure how you got it working on your local.
Below would be my suggestion to resolve this
1) Keep either the .properties or .yml file. Don't keep both
2) Use yamllint.com/ to check your yml file. The way you have tried to define your profiles wont work here. Try just 1 default profiles to start off and get it running
3) Initially point it to your local copy of your git repo only having bank-account-service.yml . Access localhost:8888/bank-account-service/default . Only if you see the results here move ahead.
4) Once everything is 100% alright on local, Push your git repo to remote and change the url.
5) To implement profiles the file name needs to change.. in your case bank-account-service-dev.yml
Let me know you need more help :)

Thread Thread
 
hendisantika profile image
Hendi Santika

Hi Mark,

  1. I was trying to use yml file only but it fails. Then I try to use properties file its working fine.
  2. I was check using yamllint.com it is said valid.
  3. I don't know it's not coming the result.
  4. Still error on my local. I already pushed new file.
  5. Previously I tried like that but still error. Now I am rolling back to use bank-account-service-dev.yml & bank-account-service-uat.yml but still error.

Cannot pull from remote gitlab.com/microservice-samples/mi..., the working tree is not clean.

Thread Thread
 
markbdsouza profile image
Mark Dsouza

Hmm any changes to your git repo containing these files, make sure you do a git add and git commit and then restart your cloud config server for it to reflect properly
Also one other thing with the yml file is you don't need the
spring:
config:
activate:
on-profile: dev
if you follow the naming convention.
All you need to do is set the profile for the microservice of the bank-account-service when you run it.

Thread Thread
 
hendisantika profile image
Hendi Santika

It's working now. I am using Spring Cloud Native with File Backend.
Git Backend is to much error for me.

Thank for your support.

Thread Thread
 
markbdsouza profile image
Mark Dsouza

Awesome !