IntelliJ IDEA Maven 无法导入jar,出现红色波浪线。像这样
最近在学习使用 Maven,用 IDEA 开发,准备以 ssm 做一个项目。
下载了 Maven,环境变量也配置了,默认的仓库也改了。
然后新建Maven项目,填写一些项目信息,选择 setting.xml 和本地仓库位置。
在 pom.xml 里添加一些需要的 依赖 jar,如
- <!-- 添加sevlet支持 -->
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>javax.servlet-api</artifactId>
- <version>3.1.0</version>
- </dependency>
- <!-- 添加jsp支持 -->
- <dependency>
- <groupId>javax.servlet.jsp</groupId>
- <artifactId>javax.servlet.jsp-api</artifactId>
- <version>2.3.1</version>
- </dependency>
- <!-- 添加jstl支持 -->
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>jstl</artifactId>
- <version>1.1.2</version>
- </dependency>
- <dependency>
- <groupId>taglibs</groupId>
- <artifactId>standard</artifactId>
- <version>1.1.2</version>
- </dependency>
- <!-- 添加spring支持 -->
- <dependency