How can I pass vm args
(java -Dport = 5) to the application context
?
I want to configure the port dynamically by the user, using the application context
.
How can I pass vm args
(java -Dport = 5) to the application context
?
I want to configure the port dynamically by the user, using the application context
.
In case you trying to access the VM arguments in spring application context, then just add the below bean definition in context file:
And access the VM args as ${vm_property}.
e.g if you passed the –Dport=5, which can be accessed as