一.IDEA中的.iml文件和.idea文件夹作用和意义

.iml文件
idea 对module 配置信息之意, infomation of module
iml是 intellij idea的工程配置文件,里面是当前project的一些配置信息。
在这里插入图片描述
.idea文件夹
.idea存放项目的配置信息,包括历史记录,版本控制信息等。
可以点击file->Settings->File types,在右下角的Ignore files and folders中可以输入.idea;和*.iml;将其隐藏。
在这里插入图片描述
不建议隐藏iml,因为项目名出现中括号是因为iml文件名和项目文件名不一样,需要更改iml文件名
在这里插入图片描述
二.IDEA使用指定配置文件
在VM options 中添加 -Dspring.profiles.active=xxx

在这里插入图片描述

三.Command line is too long问题解决

Idea启动项目报错:Command line is too long. Shorten command line for className or also for JUnit defaultconfiguration.
如下图所示:
在这里插入图片描述
解决方法:
在该项目文件夹.idea/workspace.xml中找到

<component name="PropertiesComponent">

  ...

</component>

然后在其中添加:

<property name="dynamic.classpath" value="true" />
Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐