idea creates a parent-child project

Use IDEA for project programming. It involves maven for parent-child module projects. 
1. Create a new project: file—->new—>project 
write picture description here
2. The steps are as shown in the figure: 
write picture description here
3. Fill in the company name and project name 
write picture description here
4. The created new project is as shown in the figure: 
write picture description here
5. Because the newly created project is the maven parent template, the src directory in it can be deleted. In fact, the parent project is an empty directory (understand by yourself) 
write picture description here
6. Right-click on the selected project—>new—>module 
write picture description here
7. Add templates for sub-projects, which can be added or not added according to the actual situation 
write picture description here
8、 
write picture description here
9、 
write picture description here
10. Be sure to fill in the correct file directory here, otherwise an error will be reported that pom.xml already exists, and the sub-template creation fails 
write picture description here
11. Click FINISH, and the entire project is now created. If you want to add other sub-templates, just follow these steps 
write picture description here
12. Open the sub-template file directory and find that they are all non-functional packages. You need to define the type  . 13. You may find that there is no Java package, and you can create a new one. Create a new Java package and define the type as shown in the figure below  ①, create a new module  ②, define the type 
write picture description here  


write picture description here  

write picture description here  
write picture description here
14. Define the directory style after the type is completed 

write picture description here


New sub-projects can be viewed https://blog.csdn.net/chushoutaizhong/article/details/80018628



Original https://blog.csdn.net/shyuan128/article/details/78248240

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324602071&siteId=291194637