Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the standard SpringBoot front-end split deployment?

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article shows you what the standard SpringBoot front-end separation deployment is like, the content is concise and easy to understand, can definitely brighten your eyes, through the detailed introduction of this article, I hope you can get something.

Prepare work before packing

One main domain name, three subdomains, a total of four domain names

The primary domain name is used to access the mobile end, the subdomain name 2 is used for the PC management background, the subdomain name 3 is used to access Java Api, and the subdomain name 4 is used to access picture resources.

Give an example of four domain names, which will be used below instead of

1. Mobile-> https://www.app.com

2. PC backend-> https://admin.app.com

3. Java Api-> https://api.app.com

4. Picture resources-> https://image.app.com

Java project running and packaging

1. Import the Java project into idea

Select the crmeb folder in the project, that is, the Java Api subproject

Wait for the project to be loaded automatically.

Project configuration

Configure according to one's own actual situation

Shell deployment script configuration

It is not easy to open source. According to our statistics, only the first deployment will be counted, which will not have any impact. Please modify the version number according to your own specific conditions.

Package the project

See that BUILD SUCCESS is finished packing.

WEB PC management side running and packaging

Verify that the npm environment is running correctly before running the following command

If the developer can use webStorem or Vscode

The terminal uses its own command-line tool

Cd to admin folder directory of the clone project

Modify the corresponding environment configuration file

Configure the Java Api project request domain name according to your packaged environment

Execute the package file npm install required for installation

Packaging commands can be modified according to their own needs

Execute npm run build:prod online environment build:prod online environment

After the packaging is completed, find the dist directory under the admin, and upload the folders and files under the dist directory to the corresponding site directory of the server. [the dist folder is not included here, but the files under the dist folder]

Mobile projects are packaged using Hbuild

Mobile only supports H5 and WeChat Mini Programs for the time being.

More questions about Uniapp uniapp official website

Download uniapp developer tools-> Hbuilder X

To package WeChat Mini Programs, you need to download Wechat developer tools.

Wechat developer tools can be downloaded according to your own computer system.

Be careful

There is a domain.json file in the outermost project package, which needs to be modified according to your actual situation.

Cannot have comments and json format is correct

Hbuilder X package H5

Open Hbuilder X and click on the file

Local test click to run

Pack online and click to release

The following release line appears when packing, and there is no need to enter the domain name.

Packaged successfully

The above is what the standard SpringBoot front-end split deployment looks like. Have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report