The value filling method of Program arguments in tomcat in idea

When using idea to start microservices, it is generally necessary to configure a parameter to fill in the local nacos address and namespace into the Program arguments in idea. The effect is as follows:

 This is also called server parameter .

I encountered a problem today. If I package the project into a war and deploy it with an external tomcat, I also need to fill in these two values. How should I fill it in?

First you need to find the catalina.bat of apache-tomcat-8.5.84\bin 

Above setlocal, fill in the following value, which is equivalent to the parameter value of Program arguments.

set -DNACOS_NAMESPACE=test-xxxx-04 -DNACOS_HOST=xxx.xx.xxx.xxx:30050


  The blogger’s newly launched gitee free open source project (mall + APP + applet + H5), interested friends can learn about it.

Fresh food mall kxmall-small program + App + official account H5: kxmall-fresh food mall + APP + small program + H5. At the same time, it supports WeChat applets, H5, Android App, and Apple App. Supports cluster deployment and stand-alone deployment. It can be used in B2C malls, O2O takeaways, community supermarkets, and fresh food [with a matching rider-end delivery system]. kxmall uses uniapp encoding. Use Java development, SpringBoot 2.1.x framework, MyBatis-plus persistence layer framework, Redis as cache, MySql as database. The front-end vuejs is used as the development language. https://gitee.com/zhengkaixing/kxmall

Guess you like

Origin blog.csdn.net/qq_38377190/article/details/127797858