1.Mavan配置 2.1 Spring跑起来 2.2 Spring+Web
mavan的pom.xml中所配置spring框架的基本依赖。
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>4.0.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>4.0.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-expression</artifactId>
<version>4.0.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>4.0.2.RELEASE</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.2</version>
</dependency>
-
Unable to import maven project: See logs for detail
why: IDEA与Mavan的版本不匹配
solution: 用IDEA发行日期前的Mavan版本方可。IDEA2018.3.6用Mavan3.5.4没问题
-
Failed to create a Maven project: ‘C:/Users/fei/Desktop/IdeaProjects/SpringDemo/pom.xml’ already exists in VFS
why:之前我已经在这个文件夹里创建过同名的maven项目
solution:先把这个项目删了,然后把回收站中的这个项目和之前同名的项目一起彻底删除 -
application context not configured for this file
why:起初在resources文件夹下新建了专门用于spring config文件.xml(但这个有小绿叶子哦),但没有配置该文件到项目中
solution:
或者