How to pass the -D additional parameter while starting tomcat?

后端 未结 6 583
慢半拍i
慢半拍i 2020-12-25 12:14

I have a maven project, after running command mvn install all project as well as module compile and copied to local repository successfully. But now I want

6条回答
  •  盖世英雄少女心
    2020-12-25 12:29

    You will want to set the CATALINA_OPTS system variable - this is read by Tomcat (and only by Tomcat) when starting. As @Betoverse says you can set this using the two methods:

    export CATALINA_OPTS="-Dapp.username -Dapp.username"
    

    Or in Windows:

    set CATALINA_OPTS="-Dapp.username -Dapp.username"
    

    You can add that command to your ~/.profile on UNIX to have it set automatically.

提交回复
热议问题