原因:idea不会自动把tomcat依赖加进来

解决办法:手动加入tomcat依赖

1.无法使用注解
idea使用maven去创建web项目,无法使用注解@WebServlet配置servlet问题
2.项目结构>modules>dependecies 没有tomcat依赖
idea使用maven去创建web项目,无法使用注解@WebServlet配置servlet问题
3.添加依赖 点右上角 + 号 选中tomcat依赖,加入
idea使用maven去创建web项目,无法使用注解@WebServlet配置servlet问题

idea使用maven去创建web项目,无法使用注解@WebServlet配置servlet问题
4.可以使用注解了
idea使用maven去创建web项目,无法使用注解@WebServlet配置servlet问题

相关文章:

  • 2021-05-26
  • 2021-09-08
  • 2022-12-23
  • 2021-06-09
  • 2021-08-02
  • 2021-07-22
  • 2021-06-23
猜你喜欢
  • 2021-12-11
  • 2021-07-09
  • 2021-09-18
  • 2021-06-02
  • 2022-01-30
  • 2021-11-08
  • 2021-12-26
相关资源
相似解决方案