1、创建maven项目
2、先在pom.xml中添加spring-context依赖
Spring创建项目

  • 可能会找不到依赖,那么我们就在Maven Repository中搜索
    Spring创建项目
    Spring创建项目
    然后将代码复制到pom.xml中
    Spring创建项目
    Spring创建项目
    可能maven的主路径出错了:
    settings - Build,Execution,Deployment - Build Tools - Maven - Maven Home Directory 修改成maven的主路径,重新刷新程序即可!
    Spring创建项目

相关文章: