0

I was trying to develop Spring Cloud Config server with some properties. So on that site it was mentioned that replace the application.properties file into bootstrap.properties file. Code is given as below,

@SpringBootApplication
@EnableConfigServer
public class ConfigserverApplication {
   public static void main(String[] args) {
      SpringApplication.run(ConfigserverApplication.class, args);
   }
}

and properties file ,

server.port = 8888
spring.cloud.config.server.native.searchLocations=file:///C:/configprop/
SPRING_PROFILES_ACTIVE=native

So where exactly this bootstrap.properties file resides in ? Is that complete replacement for application.properties or both exists in config server?

  • Yep just stick in in resources directory. You get app properties from your config server. – 123 May 17 '20 at 16:31
  • We will get properties but my question was when to go for bootstrap.properties file as we have application.properties already? – Ganesh Ghodake May 17 '20 at 16:34
  • You need bootstrap to retrieve your actual app properties from a config provider. No point using Spring Cloud Config if you are using local properties files. – 123 May 17 '20 at 16:35

0 Answers0