search

Home  >  Q&A  >  body text

java - An existing project package name is similar to com.company..... How can I simply change the package name to com.test.....

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?

欧阳克欧阳克2751 days ago1052

reply all(5)I'll reply

  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-06-12 09:25:11

    If you use intellij idea, right-click the package --> Refactor --> Rename, automatically modify the package and modify the references in the code

    reply
    0
  • 我想大声告诉你

    我想大声告诉你2017-06-12 09:25:11

    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.

    reply
    0
  • 欧阳克

    欧阳克2017-06-12 09:25:11

    ALT+SHIFT+R

    reply
    0
  • 習慣沉默

    習慣沉默2017-06-12 09:25:11

    IDE Refactor

    reply
    0
  • ringa_lee

    ringa_lee2017-06-12 09:25:11

    Find the location of your project on your computer and double-click the folder name to modify it

    reply
    0
  • Cancelreply