There are various similar questions but none answers where to embed the environment variable. Unfortunately, in my case there is already a file named setenv.bat
which contains a lot of code.
There is a lot of code in it. So the question is where do I write (on which line at what place within setenv.bat
)
set "JAVA_OPTS=%JAVA_OPTS% -Dblockchain.callbackUrl=http://example.com/"
I wrote it at the beginning of setenv.bat
but it doesn't work.
FYI : I installed tomcat using the windows installer, hence, I have tomcat7w.exe
I'm running tomcat as a windows service
I'm trying to access this variable through Spring in my webapp as :
@Value("#{systemProperties['blockchain.callbackUrl']?:'http://localhost:8080/'}")
private String callbackHost;
Update
I tried setting it in catalina.bat, still didn't worked.
Aucun commentaire:
Enregistrer un commentaire