java - Spring boot overriding property in other application files -
i running jar in following way in unix
java -jar $classpath --spring.config.location=application.yml
and using properties file configuring following way:
@propertysource("file:${dataservice_properties}") both application.yml , dataservice_properties have property
server.port i want use server.port in application.yml.
i thought properties supplied via commandline has highest precedence(from below link), why server.port dataservice_properties taken?
properties supplied via command line override properties in src/main/resources/application.properties , in config/application.properties since specifying in code file use doesn't apply. why aren't using on of 2 property file location above ? can remove @propertysource , able override properties via command line .
Comments
Post a Comment