Hi , i just wanted to know how to set JVM(Heap configuration) parameters in spring boot application in order to improve my spring boot application performance.? i don't want to set while running spring boot jar in command line, i need to configure in some properties file or config file so that while starting spring boot app it should pick up those parameters. how to do that?
Why not just create a shortcut or batch script that supplies the JVM arguments?
Eshwara Chaluvaiah
Greenhorn
Posts: 27
posted 4 months ago
Stephan van Hulst wrote:Why not just create a shortcut or batch script that supplies the JVM arguments?
can't we configure in some config file or embedded server config file.?
Stephan van Hulst
Saloon Keeper
Posts: 9707
192
posted 4 months ago
I don't know, but why would you want to do that if you can just create a batch script for each environment? Do you have a good reason not to use scripts or shortcuts?
Memory settings must be applied when the JVM starts. When you use a Spring Boot config file, or configuration of the embedded server, it's already too late - the JVM has already started. Unless there's a JVM config file I don't know about, you are stuck with providing it when the JVM starts. A script file is the easiest way.