IDEA添加Tomcat及其问题

一、为IDEA添加Tomcat:

  1. 添加全局的Tomcat:
    File --> Setting --> Build,Execution,Deployment --> Application Servers --> + --> Tomcat Server --> 选择要添加的服务器 --> Ok
    在这里插入图片描述
  2. 为单个项目添加:
    Add Configuration…[Run --> Edit Configuration…] --> + --> Tomcat Server --> Local --> Name: --> Server(配置) --> Deployment(直接Fix) --> Apply
    在这里插入图片描述

二、添加到External Library:

  1. 添加Modules:File --> Project Structure --> Modules --> + --> Web
    在这里插入图片描述

  2. 添加Library…:项目 --> + --> Library…
    在这里插入图片描述

  3. 新建Library: Application Server Libraries --> New Library… --> Java --> 找到tomcat --> OK --> [为其重命名]
    在这里插入图片描述

  4. 编辑Library:File --> Project Structure --> Libraries --> 选中要编辑的Libraries --> 编辑(添加、删除、修改name)
    在这里插入图片描述

  5. 添加tomcat成功的标志:
    在这里插入图片描述

四、解决扫描JAR的时间缩短:

  1. 异常信息:
    在这里插入图片描述
  2. 解决方法:找到tomcat下的conf下的catalina.properties修改:
    在这里插入图片描述

五、解决未知版本字符串 [4.0]:

  1. 异常信息:
    在这里插入图片描述
  2. 解决方法:
    在这里插入图片描述

六、设置IDEA的字符编码为UTF-8:

  1. 转至:https://blog.csdn.net/m0_38132361/article/details/80628203

猜你喜欢

转载自blog.csdn.net/weixin_57542177/article/details/121110996