临沂网站维护,织梦网站搜索页点击返回首页没有反应,网站渗透入侵全部教程,网站建设开票是几个点本文简单描述分别用Idea菜单、pom.xml文件管理项目模块module
踩过的坑#xff1a;
通过idea菜单创建模块#xff0c;并用idea菜单修改模块名#xff0c;结构程序编译报错#xff0c;出错的代码莫名奇妙。双击maven弹窗clean时#xff0c;还是报错。因为模块是新建的
通过idea菜单创建模块并用idea菜单修改模块名结构程序编译报错出错的代码莫名奇妙。双击maven弹窗clean时还是报错。因为模块是新建的只有两个controller函数非常简单感觉是改模块名时idea把某些配置信息改了出现编译问题。 困惑过后冷静思考idea只是高级编辑器界面上的所有修改都应该固化到项目文件中。
以创建模块module为例 ①向导窗口中填写的模块名称yudao-module-app会写入新建模块的pom.xml文件中 实际上idea界面中的模块名称取自该模块下的pom.xml中的name字段一般与artifactId相同
artifactIdyudao-module-app222/artifactId
......
nameyudao-module-app/name 证明当通过idea界面修改模块名称时pom.xml中的artifactId字段会同步改变。 注但是修改pom.xml的artifactId字段时idea界面显示的模块名称不会同步修改
而且模块名与路径名要同步修改否则maven会报错 IDEA重命名一个模块(详细说明)_compiler.xml-CSDN博客文章浏览阅读1w次点赞11次收藏49次。最精准无误地修改idea的模块名!_compiler.xmlhttps://blog.csdn.net/xiaoyouyouaaa/article/details/122729353?ops_request_misc%257B%2522request%255Fid%2522%253A%2522168506388216782425116170%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257Drequest_id168506388216782425116170biz_id0utm_mediumdistribute.pc_search_result.none-task-blog-2~all~first_rank_ecpm_v1~rank_v31_ecpm-1-122729353-null-null.142%5Ev88%5Econtrol_2,239%5Ev2%5Einsert_chatgptutm_termidea%E6%A8%A1%E5%9D%97%E9%87%8D%E5%91%BD%E5%90%8D%E9%97%AE%E9%A2%98spm1018.2226.3001.4187https://blog.csdn.net/xiaoyouyouaaa/article/details/122729353?ops_request_misc%257B%2522request%255Fid%2522%253A%2522168506388216782425116170%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257Drequest_id168506388216782425116170biz_id0utm_mediumdistribute.pc_search_result.none-task-blog-2~all~first_rank_ecpm_v1~rank_v31_ecpm-1-122729353-null-null.142%5Ev88%5Econtrol_2,239%5Ev2%5Einsert_chatgptutm_termidea%E6%A8%A1%E5%9D%97%E9%87%8D%E5%91%BD%E5%90%8D%E9%97%AE%E9%A2%98spm1018.2226.3001.4187https://blog.csdn.net/xiaoyouyouaaa/article/details/122729353?ops_request_misc%257B%2522request%255Fid%2522%253A%2522168506388216782425116170%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257Drequest_id168506388216782425116170biz_id0utm_mediumdistribute.pc_search_result.none-task-blog-2~all~first_rank_ecpm_v1~rank_v31_ecpm-1-122729353-null-null.142%5Ev88%5Econtrol_2,239%5Ev2%5Einsert_chatgptutm_termidea%E6%A8%A1%E5%9D%97%E9%87%8D%E5%91%BD%E5%90%8D%E9%97%AE%E9%A2%98spm1018.2226.3001.4187https://blog.csdn.net/xiaoyouyouaaa/article/details/122729353?ops_request_misc%257B%2522request%255Fid%2522%253A%2522168506388216782425116170%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257Drequest_id168506388216782425116170biz_id0utm_mediumdistribute.pc_search_result.none-task-blog-2~all~first_rank_ecpm_v1~rank_v31_ecpm-1-122729353-null-null.142%5Ev88%5Econtrol_2,239%5Ev2%5Einsert_chatgptutm_termidea%E6%A8%A1%E5%9D%97%E9%87%8D%E5%91%BD%E5%90%8D%E9%97%AE%E9%A2%98spm1018.2226.3001.4187老鸟提示新建模块时命名要遵守规范因为修改module名称很麻烦创建后少修改。
②idea创建模块时会将新建模块名称写入父模块pom.xml文件中
modulesmoduleyudao-dependencies/modulemoduleyudao-framework/module!-- Server 主项目 --moduleyudao-server/module!-- 各种 module 拓展 --moduleyudao-module-system/modulemoduleyudao-module-infra/modulemoduleyudao-module-app/module !-- 由idea创建的模块idea自动将模块名加入父项目的pom.xml中 --
/modules 注通过idea菜单删除模块时父模块pom.xml中的注册信息不会自动删除。 删除模块后父模块pom.xml中定义的moduleyudao-module-app/module会爆红
③项目根路径下的.idea目录被git忽略中有maven相关配置 注.idea目录中的文件是由idea管理的不建议手动编辑可以在IDEA界面编辑
IntelliJ IDEA: What Is the .idea Folder and How to Manage It - BootcampToProdLearn about the .idea folder in IntelliJ IDEA, its purpose, content, and best practices. This blog post will explain how to configure, ignore, share, andhttps://bootcamptoprod.com/intellij-idea-folder/https://bootcamptoprod.com/intellij-idea-folder/https://bootcamptoprod.com/intellij-idea-folder/
How to Configure the .idea Folder?
如何配置 .idea 文件夹
The .idea folder is automatically generated and updated by IntelliJ IDEA based on the project structure and the user actions. We do not need to manually edit the files inside the .idea folder, as this can cause errors or inconsistencies. Instead, we can use the IDE’s graphical user interface (GUI) to configure the project settings and preferences. .idea 文件夹由 IntelliJ IDEA 根据项目结构和用户操作自动生成和更新。我们不需要手动编辑 .idea 文件夹内的文件因为这可能会导致错误或不一致。相反我们可以使用 IDE 的图形用户界面GUI来配置项目设置和首选项。
To access the project settings, we can go to File - Project Structure or press CtrlAltShiftS. On macOS shortcut is Command; This will open a dialog window where we can adjust various options, such as:
要访问项目设置可以转到 “File” - “Project Structure” 或按 Windows 上的 CtrlAltShiftS。在 macOS 上的快捷键是 Command;。这将打开一个对话框窗口我们可以在其中调整各种选项例如
Project SDK and language levelProject compiler output pathModules and dependenciesLibraries and global librariesArtifacts and build toolsAnd more
To access the preferences, we can go to File - Settings or press CtrlAltS on windows OS. On macOS, we can go to Intellij IDEA - Settings or press Command, .This will open another dialog window where we can customize various options, such as:
要访问首选项可以转到 “File” - “Settings” 或在 Windows 操作系统上按 CtrlAltS。在 macOS 上可以转到 “IntelliJ IDEA” - “Preferences” 或按 Command,。这将打开另一个对话框窗口我们可以在其中自定义各种选项例如
Editor settings, such as code style, fonts, colors, inspections, etc.Plugins and marketplaceVersion control settings, such as VCS integration, commit options, branches, etc.Tools settings, such as terminal, database, HTTP client, etc.And more
We can also use the search bar at the top of the dialog windows to quickly find the option we are looking for.
我们还可以在对话框窗口顶部的搜索栏中使用搜索功能快速找到我们正在寻找的选项。 设置-》编译器-》排除配置idea界面与compiler.xml文件对应关系 项目结构-》项目-》sdk 配置jdk版本idea界面与compiler.xml文件对应关系 设置-》构建、执行、部署-》构建工具-》Maven-》已忽略的文件 配置对应关系 我发现.idea目录中的配置文件更新不及时解决办法涉及模块、目录结构的项目框架少改
idea右边栏maven配置中子模块是否显示与根pom.xml中module标签的关系
注释 moduleyudao-module-member/module 并刷新maven点击蓝色m按键后右边栏maven菜单中yudao-module-member子模块不再显示