如何在ideal中更改module的名字

ideal中修改module和directoryhtml

如何在ideal中修改module的名字。 平时在建立项目的的时候 ,偶尔会根据业务需求或者心情需求,来更改下module的名字。maven

更改的时候 要注意。ide

1.先改pom.xml中的artifactId的名字idea

 <artifactId>hcb_common</artifactId>

2.再shift+f6 理改module和directore的名字,不要勾选reference相关。spa

3.更改父项目中module的名字3d

好比要把common改成hcb_common,orm

image-20210329233751110

选中common 按shirt+f6弹出的对话框选择 rename module and directoryxml

image-20210329233901462

输入要更改的名字,先不要打勾search for references and search in comments and strings .htm

image-20210329234000026

若是更改完之后,出现以下提示blog


则表示 module更改为功了,可是directory还没成功 。 https://yyk.fh21.com.cn/hospital_7942/tsyl.html

继续shift +f6更改directory ,若是仍是不成功的话。 打开该module在资源管理器中的位置,直接在资源管理中更改

image-20210329234256095

改完之后回到ideal中,自动的module会变回新的名字

image-20210329234356935

而后再把父项目的pom.xml中引用的module名字变动一下


同时记得修改module中pom.xml中的artifactid ,不然会出现以下显示 ,

com.hcb.common是最原始的一个名字。

image-20210329234725833

一样的右边的maven也是显示com.hcb.common

image-20210329234805278

更改完之后,若是module仍是显示 有原来的名字,则从新更改下module .

就能够了。