An existing project package name is similar to com.company..... How can I simply change the package name to com.test.....
If the project is a maven project, how should it be modified?
温故而知新,可以为师矣。 博客:www.ouyangke.com
If you use intellij idea, right-click the package --> Refactor --> Rename, automatically modify the package and modify the references in the code
Does the IDE have this kind of refactoring function?
If not, here is a batch replacement method:
find . | xargs -I file sed s/com.xxx/com.yyy/g -i file
findYou can add -name to filter java and xml files without writing mobile phone code.
find
-name
ALT+SHIFT+R
IDE Refactor
Find the location of your project on your computer and double-click the folder name to modify it
If you use intellij idea, right-click the package --> Refactor --> Rename, automatically modify the package and modify the references in the code
Does the IDE have this kind of refactoring function?
If not, here is a batch replacement method:
find
You can add-name
to filter java and xml files without writing mobile phone code.IDE Refactor
Find the location of your project on your computer and double-click the folder name to modify it