maven中引入新的依赖不出现在项目的External Libraries的问题,修改idea配置文件解决
1.查看当前电脑用户的idea配置文件中是否有projectView.xml文件,如果没有新建一个名为projectView的xml文件
文件存放路径:C:\Users\Luther_Lau\.IntelliJIdea2018.2\config\options
2. 在文件中加入以下代码
<application> <component name="ProjectViewSharedSettings"> <option name="abbreviatePackages" value="true" /> <option name="showLibraryContents" value="true" /> <option name="showMembers" value="true" /> <option name="showModules" value="true" /> </component> </application>
这样的话,在idea的maven中下载maven包之后,External Libraries就会出现相应的maven包了,我是这个解决的,当然还可以通过刷新maven项目来解决
在maven项目中手动加入jar包
1.点击IDEA左上角的File,然后点击Project Structure
2.点击Modules,然后右侧点击Dependencies
3.点击右侧绿色小+号,选择第一个选项:JARs or directories
4.选择好你本地磁盘的jar包,点击OK,然后Apply即可