当前位置:网站首页>Summary of idea practical skills: how to rename a project or module to completely solve all the problems you encounter that do not work. It is suggested that the five-star collection be your daughter

Summary of idea practical skills: how to rename a project or module to completely solve all the problems you encounter that do not work. It is suggested that the five-star collection be your daughter

2022-06-24 20:46:00 Interesting talk about handsome men

In the actual development process , You often encounter creating a project perhaps module I didn't think out my name when I was , During the development process, it suddenly occurred to me that a suitable name needs to be modified , Maybe everyone's focus is on how to write business code , Yes IDE As long as it works , I seldom study hard IDE Related skills . I also encountered this problem , First summarize it and share it with you , It is convenient for students who encounter problems to consult .

Rename Methods

  • Usually people right-click directly Refactor, And then choose Rename

  • rename project 

  

  • rename module, Usually choose module and directory

  • There are two when modifying search To check ,scope Range selection All Places 

  •   If you follow the above procedure , After modifying the name , If you take it for granted that it has been revised, you are very wrong . Let me give you an example , I want to put cloud-loadbalancer-client6060 Change to 6061, You see in project Window modified , But in maven The window has not been modified . Now let's tell you , except Rename outside , What else is needed .

Focus on auxiliary operations

  • Check the book module Of pom Whether the name has been changed in the document , The name is the above maven The real reason for not changing the name .

  • Check the parent project pom Whether the file name has been modified , Found not modified , It's all wrong

  •  F4 Open check Module Setting, Or right-click to select Open Module Setting, Check whether to modify

  •   see project Of .idea file , Usually in compiler.xml、encodings.xml Some parts of the two documents are also omitted to be renamed , Use editing tools ,Ctrl+F Find the total number of , Then modify them one by one , Remember never to correct your mistakes .

  • After the above-mentioned methods are used to check and fill the gaps , Basically, the revision is finished , You can safely and boldly use renamed projects and Module 了 . 

summary : 

  • The development tools are not perfect , There is a lot of room for adjustment , Not only is Idea There is this problem ,eclipse Also have
  • Problems encountered in the development process should be summarized , And write it down , Otherwise, it will take a long time , I forgot , I will still be crazy when I meet you again .
  • It's a good habit to write it down and make notes once and for all .

Access to the source code , Please pay attention to the official account. , reply 【cloud】 obtain

You are also welcome to add personal wechat 【shishuai860505】, I pull everyone into my reader exchange group .

原网站

版权声明
本文为[Interesting talk about handsome men]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202211326210291.html