java - How to pass into spring-boot context application properties location programmatically -


i using java-main , injected inside spring-boot container. using spring boot application properties configuration way:

@configuration @componentscan("com.mycompany") @propertysource("file:/users/tt/application.properties") public class springconfiguration { .. } 

that works fine. need hardcode application.properties path. there way give inject dynamically argument?

i want remind again spring-boot isnt running main container.. using it's libs inside java main process cant use spring-boot built-in functionality.

thanks, ray.


Comments

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

html - Outlook 2010 Anchor (url/address/link) -

android - How to create dynamically Fragment pager adapter -