- request.getServletContext()方法报错
加入下面的坐标。
< dependency>
< groupId>javax.servlet< /groupId>
< artifactId>javax.servlet-api< /artifactId>
< version>3.1.0< /version>
< /dependency>
- pom文件依赖不自动下载问题
创建maven工程后,弹出“maven projects need to be imported”是不要选择“Enable Auto-Import”,而是每次导入完依赖后手动点“Import Changes”。
什么原因不知道,暂时就先别设置自动下载了
- maven工程做ssm框架整合是,resources目录下导入log4j.properties文件后还是报错
重启了一下idea就好了
本文解决Maven工程中使用request.getServletContext()方法报错的问题,通过添加javax.servlet-api依赖解决。同时,讨论了pom文件依赖不自动下载的解决策略,建议手动导入变化。最后,分享了在SSM框架整合中,resources目录下log4j.properties文件导入后报错的重启IDEA解决方法。
17万+

被折叠的 条评论
为什么被折叠?



