0

After lot of online search & tried lot of experiments. finally i didn't get any of the link which can full-fill my requirement, so finally I choose this platform.

Note : I am using Spring-Boot Maven Project & Tomcat 7.0.62 version & JDK 7.

First of all I was using Embedded Tomcat & produce .Jar and i was passing extra dynamic parameter to .jar using command line argument.

Now, scenario has been changed. My .Jar file will be converts to .war file also we have excluded Embedded Tomcat i.e. not embedded Tomcat.

Now i want to pass same list of command-line argument to my Spring-Boot project's .war file from outside. something like from tomcat.

any help appreciate.

Vishal Gajera
  • 4,137
  • 5
  • 28
  • 55
  • if anyone looking out for solution, pls have a look at : https://stackoverflow.com/a/53297330/1131967 – bittu Nov 19 '18 at 11:56

1 Answers1

0

You have a few options in a servlet container/application server:

  1. Use system properties
  2. Use init parameters
  3. Use JNDI

They'll all be available via Spring's Environment so will work pretty much as it you'd passed them in via the command line.

Andy Wilkinson
  • 108,729
  • 24
  • 257
  • 242