当前位置:网站首页>Establishment of microservice development environment
Establishment of microservice development environment
2022-06-13 01:44:00 【I love to enjoy】
- 1. To configure maven, Use Alibaba image library
- 2.idea Download commonly used plug-ins ,lomok Plug ins and mybatis plug-in unit
- 3. New project , Microservice distributed engineering
- 4. Front end development tool installation vs code
- 5. To configure git Code warehouse management
- This article permanently updates the address :
1. To configure maven, Use Alibaba image library
find maven Download installation directory , find conf The configuration file , modify setting.xml The configuration file
- Find search mirror, Change the official image to Alibaba image
<mirror> <id>alimaven</id> <mirrorOf>central</mirrorOf> <name>aliyun maven</name> <url>https://maven.aliyun.com/nexus/content/groups/public/</url> </mirror> </mirrors>
- Search for profile, modify jdk edition , Give Way maven Use jdk1.8 Compile the project
<profiles>
<profile>
<id>jdk-1.8</id>
<activation>
<activeByDefault>true</activeByDefault>
<jdk>1.8</jdk>
</activation>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
</properties>
</profile>
</profiles>
- find idea Set up ,maven Build settings , To configure maven, Give Way idea Use our local maven

2.idea Download commonly used plug-ins ,lomok Plug ins and mybatis plug-in unit
- lomok The role of plug-ins is to simplify java bean Development of
- mybatisX The function of the plug-in is to quickly start from mapper Locate the xml file
3. New project , Microservice distributed engineering
Create a new general springboot Other modules of project collective management
4. Front end development tool installation vs code
After installation , You need to install some plug-ins
- Auto close Tag Auto close HTML/XML label
- Auto Rename Tag Automatically complete the synchronous modification of the other side label
- Chinese Chinese interface
- ESLint :es Syntax check , Grammatical error correction
- HTML css Support: Give Way html Write on labels class Smart tip the styles supported by the current project
- HTML Snippets:html Fast automatic completion
- JavaScript Es6 code snippets :ES6 Grammar intelligent prompt and fast input , except js External reparative branch a .ts,.jsx,.tsx,.html,.vue, Omit to configure it to support a variety of include js Time of code file
- Live server : Open as an embedded server
- open in browser: The browser opens quickly
- vetur: Syntax highlighting 、 intellisense 、Emmet etc.
Install ten plug-ins

5. To configure git Code warehouse management
download git Client management tools and install
Right click anywhere to display gitgui and gitbash, open gitbash window , Yes git Set it up , tell git Which user name , The mailbox is in use , Each submission will display the author name
git config --global user.name "wuailexiang" // User name customization , The name of the submitter is displayed when you submit the code
git config --global user.email "[email protected]" // Mailbox when needed gitee Sign up for email
To avoid entering the account password every time you pull or submit the code , Set up ssh No secret connection , After setting, use the command ssh -T [email protected] Check for success , You will be prompted whether you need to use this key as a connection , Input yes that will do , This key will be used later to submit and pull
stay gitee Build a new warehouse
Initialize the repository , Choice language java, add to gitignore Template selection maven, Branch model selection production / Development model , After development, submit to master Branch

#### 6. stay idea Create a project on
Use the newly created git Warehouse , stay file-new- project from version Copy git New warehouse address on clone A project

newly build module, choice springboot Check the two necessary microservice plug-ins ,Spring web And services that need to be called remotely openFeign

After all modules are added successfully , Take this project as a general project , Add microservices and other services as a module , Copy... From another service pom.xml Modify the configuration file under the general directory , Delete files that have not been added , add to package by pom
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.atguigu.gulimall</groupId>
<artifactId>gulimall</artifactId>
<version>1.0.0</version>
<name>gulimall</name>
<description> Aggregation services </description>
<packaging>pom</packaging>
</projec>
<modules>
<module>gulimall-member</module>
<module>gulimall-order</module>
<module>gulimall-product</module>
<module>gulimall-ware</module>
<module>gulimall-coupon</module>
</modules>
Click on maven+ Number , Add total services , Operate on the total service , Everything else will be updated

modify git Submit unwanted documents and filter them out , Submit git You won't bring useless files with you , Only keep src Code files and pom file , and . gitignore file
Modify in master project .gitignore file , Add unused files that need to be shielded , Use **/ Match a file name in any directory that does not need to be submitted
**/mvnw
**/mvnw.cmd
**/.mvn
**/target/
.idea
**/.gitignore
**/gulimall.iml

Check submit commit Submit to local , then push To gitee Warehouse

This article permanently updates the address :
https://www.fenxiangbe.com/p/ Build a microservice development environment .html
边栏推荐
- C language implementation of the classic eight queens problem
- numpy多维数组转置transpose
- The second round of mesa
- 6、 Implementation of warehouse out management function
- Audiences with similar interests
- Implementation and design of JMeter interface test database assertion for CSDN salary increase technology
- Page optimization - Notes
- Network communication tcp/ip
- Temporary objects and compilation optimization
- [wsl2]wsl2 migrate virtual disk file ext4 vhdx
猜你喜欢

Machine learning basic SVM (support vector machine)

项目实训(十七)---个人工作总结

Server installation jupyterab and remote login configuration

Numpy multidimensional array transpose transpose

csdn涨薪技术之Jmeter接口测试数据库断言的实现与设计

Introduction to ROS runtime

September 3, 2021 visual notes

Temporary objects and compilation optimization

V-inline-date, similar to Ctrip, flying pig, time selection with price

Quickly set the computer to turn off automatically
随机推荐
谷歌的受众群体是如何发挥作用的?
Startup, connection and stop of MySQL service
Three paradigms of database
What is the path field—— Competitive advertising
Implementation and design of JMeter interface test database assertion for CSDN salary increase technology
[从零开始学习FPGA编程-22]:进阶篇 - 架构 - FPGA内部硬件电路的设计与建模
MySQL - use field alias after where
[wsl2] restrict wsl2 accessible hardware resources (cpu/ memory)
MySQL related summary
Sonarqube local installation
水管工游戏
白噪声的详细理解
深度学习调参技巧详解
Machine learning basic SVM (support vector machine)
Shell command notes
【软考】软件设计师知识点整理(待更新)
Large end storage and small end storage
MySQL performance optimization
【官方文件汇总】国科大学位论文撰写规范
[WSL2]WSL2迁移虚拟磁盘文件ext4.vhdx
