In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "how to deploy jeecg-boot 's war package". In daily operation, I believe many people have doubts about how to deploy jeecg-boot 's war package. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the questions of "how to deploy jeecg-boot 's war package". Next, please follow the editor to study!
1. Xxx-business-data-desk, backstage project, package war.
The project packaging format in the 1.pom.xml file is set to war
4.0.0uxh-business-module-systemwar
2.pom.xml file delete plug-in spring-boot-maven-plugin
The following configuration is deleted
Org.springframework.bootspring-boot-maven-plugin
II. Deployment of tomcat in xxx-business-data-desk, a background project
1. Set tomcat port number 80, set encoding URLEncoding= "UTF-8"
two。 Deploy the project to the tomcat installation directory webapps/uxh_BusinessDataDesk
After completion, the project can be accessed through http://localhost:8080/uxh_BusinessDataDesk, indicating that the token error indicates that the deployment is successful!
Note: the directory name after tomcat decompresses war is the root path you access, that is, the uxh_BusinessDataDesk here.
Third, the front desk project uxh-xxx-vue build
1. Modify public/index.html. Here you need to change the domain name to your own domain name.
/ / window._CONFIG ['domianURL'] =' http://127.0.0.1:8080/uxh_BusinessDataDesk';// local window._CONFIG ['domianURL'] =' http://bms.xxx.com:8080/uxh_BusinessDataDesk';// Ali Cloud domain name address
two。 The name of the backend API service project is jeecg-boot by default. If you need a personalized haul, you can modify the baseURL parameter in src/utils/request.js:
/ / create axios instance const service = axios.create ({baseURL:'/ uxh_BusinessDataDesk', / / api base_url timeout: 120000 / / request timeout})
3. Build project, use the build command to package the project, and the backend of build will generate a dist directory with extremely build files in this directory.
IV. Nginx configuration (/ usr/local/nginx/conf/nginx.conf)
Nginx listens on port 80
Server {listen 80; server_name your domain name # backend service configuration. With this location configured, you can access location ^ / uxh_BusinessDataDesk {proxy_pass http://127.0.0.1:8080/jeecg-boot/; proxy_set_header Host 127.0.0.1 via the http:// domain name / jeecg-boot/xxxx. Proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;} # solves the problem that the page cannot be found by refreshing the routing address in Router (mode: 'history') mode location / {root html Index index.html index.htm;if (!-e $request_filename) {rewrite ^ (. *) $/ index.html?s=$1 last;break;}
4. Nginx enables compression to improve the efficiency of home page access (the front-end project nginx shown on the official website is deployed with gzip compression to speed up the first visit)
Add the following snippet to the http of nginx.conf
# gzip config gzip on;gzip_min_length 1k leading MSIE compounding level 9 cross gzipholders types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;gzip_vary on;gzip_disable "MSIE [1-6]\."
Start tomcat and nginx after configuration
Through http:// your domain name / access project, the following page appears, using the account / password: admin/123456 login can be successful!
At this point, the study on "how to deploy the war package of jeecg-boot" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.