1

I have implemented a spring boot + angular 4 application where i managed all as Server (BE JAVA SPRING boot) + client (FE ANgular app). All was fine until i added the @EnableConfigServer of spring cloud, i used it in order to make my passwords crypted in the application.yml.

I have all configured properly, because i used same specification on another application with spring boot AngularJS.

The problem, i faced only with angular 4, where on the deploy, the browser doesn't found any files in the assets folder like my i18n files translation and images folder etc..

in the browser when i try to access my folder assets as: localhost:9090/contextapp/assests it turns a json response that containes:

{"name":"assets","profiles":["i18n"],"label":"en.json","version":null,"state":null,"propertySources":[]}

in my application.yml i have:

spring:
  cloud:
   config:
    server:
     native:
      searchLocations: C:/config-repo
  profiles: native

How can i proceed?

it4Astuces
  • 432
  • 5
  • 17
haya
  • 11
  • 1
  • Duplicate? https://stackoverflow.com/questions/54557032/config-spring-cloud-config-server – spencergibb Feb 06 '19 at 16:40
  • no i'm not looking to call config files from the folder config-repo, i set this comfiguration inordder to not use a uri remot server and the folder is empty. My applications.yml will be detected from -Dspring.config.location when i excute the Jar. I have problem with the folder assets of Angular. And when i disable the EnbaleConfigServer , all works fine. – haya Feb 06 '19 at 16:45
  • Why do you have config server? Config server is used to load remote properties. If you are just loading local properties, boot does that natively. – spencergibb Feb 06 '19 at 16:52
  • i used it in order to decrypte the passwords on the file application.yml '{Cipher}cryptedPwd' where cryptedPwd is the value of the password crypted by the tool spring-cli. I don't maybe there is another why to don't use it ? as i found on internet i must able my spring boot main with EnableConfigServer in order to scan 'cipher' in file .yml – haya Feb 07 '19 at 08:39

0 Answers0