错误1. MVC application context in module test, File is included in 4 contexts

解决办法: File --> Project Structure --> Facets --> Spring --> 减号删除全部 --> 加号添加

错误2. No mapping found for HTTP request with URI [/helloworld] in DispatcherServle

解决办法: 在 applicationContext.xml 文件中添加 <mvc:annotation-driven/> 否则使用 controller 注解的控制器不会生效

错误3. java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

解决办法: File --> Project Structure --> Artifacts --> 右下角Fix --> Add all mission dependencies

标签: springmvc

添加新评论