【Spring】IDEA新建Spring项目

版权声明:本文内容来源于网络,如有侵权请联系删除 https://blog.csdn.net/ZyhMemory/article/details/88539889

1. IntelliJ IDEA打开选择Create New Project

在这里插入图片描述

2. 默认应该是选中Sping的然后下一步

在这里插入图片描述

3. 设置路径和名字

在这里插入图片描述

4. 看到这个 别管他 过会就好了 然后就可以看到lib里面自动下好了jar包

在这里插入图片描述
在这里插入图片描述

5. 写个HelloWorld看看

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

哦了,结束……

小插曲

中间出现了找不到xml的情况,一定记得applicationContext.xml创建在src下
或者设置一下ClassPathXmlApplicationContext的路径

错误如下:
Exception in thread “main” org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [applicationContext.xml]; nested exception is java.io.FileNotFoundException: class path resource [applicationContext.xml] cannot be opened because it does not exist
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/ZyhMemory/article/details/88539889