1.idea导入一个maven项目后,并没有正确识别springboot相应的配置,如图

图1:正常情况下 resources颜色是黄色的, resources下的文件应该是绿色的;
这里是由于导入maven项目的原因,idea插件没能正确识别resources这个目录;
不过我们有解决办法:
再idea中,File->project Structure -> modules ,如图

选中resources目录,点击上方Resources 让它变成黄色的,操作后,idea就能正确识别springboot项目的各个配置;

网友评论