How is the SpringBoot project deployed? Refer to the project case: github.crmeb.net/u/crmeb

Preparation work before packing

One primary domain, three subdomains four domains

The main domain name is used to access the mobile terminal, subdomain name 2 is used to access the PC management background, subdomain name 3 is used to access the Java Api, and subdomain name 4 is used to access image resources

Here are four examples of domain names

  1. Mobile –> www.app.com

  2. PC background –> admin.app.com

  3. Java Api —> api.app.com

  4. Image resources –> image.app.com

Java projects run and package

  1. Import the Java project into IDEA

Select the CRMEB folder in your project, which is the Java Api subproject

Wait for the project to load automatically

Item Configuration Configuration based on site requirements

Shell deployment script configuration

Open source is not easy, our company will count the installation number, only the first deployment will be counted, there is no impact, please modify according to your own specific situation, the version number does not need to change

Packaging project

See BUILD SUCCESS package completed

The WEB PC management runs and is packaged

Before running the following command, ensure that the NPM environment is running correctly

If the development can use webStorem or Vscode

The terminal uses its own command-line tools

CD to the admin folder directory of the Clone project

Modify the corresponding environment configuration file

Configure the Java Api project request domain name based on your packaged environment

Execute the required package NPM install

The packaging command can be modified as required

Run NPM run build:prod Online environment build:prod online environment

After the packaging is completed, find the dist directory under admin and upload the folders and files in the dist directory to the corresponding site directory of the server.

Mobile project packaging, using Hbuild

The mobile terminal only supports H5 and wechat small programs for the time being

More questions about Uniapp

Download uniApp Developer tools —-> Hbuilder X

To package wechat applets, you need to download wechat developer tools

Wechat developer tools can be downloaded according to your computer system

Pay attention to

There is a domain.json file in the outermost project package. You need to modify the file as required

There are no comments and the JSON format is correct

Hbuilder X packages H5

Open Hbuilder X and click file

Local tests click run

Online package click issue

When packaging, you can click the release line below, without entering the domain name

The following figure shows the successful packaging