suppose I define a property when starting my Spring Boot application from command line by passing -Dmy.property=314 to JVM, and also I define this property in the application.properties :
my.property=318
to my knowledge the command line one has higher priority and when I inject the value of my.property in a bean I get 314. is there any API that I can get properties regardless of where it is defined and respect this priority? I mean I get the property that will be injected in beans by Spring.
                        
If you don't want to inject the property via other mechanisms like
@Valueor bindings like@ConfigurationProperties, you can get it viaEnvironment