简体   繁体   English

Tomcat 无法识别 java 中的更改(Intellij 配置)

[英]Tomcat doesn't recognise changes in java ( Intellij Configuration )

I have a very weird problem.我有一个非常奇怪的问题。 Any change I make in java, I have to first build the project -> then copy the folder from target -> webapps directory into the tomcat webapps directory .我在 java 中所做的任何更改,我必须首先构建项目 -> 然后将文件夹从目标 -> webapps directory复制到tomcat webapps directory中。 And only then the latest Changes will be executed in Tomcat ( If I don't do that, not a single change neither in Front-end nor Back-end is being executed in Tomcat).只有这样,最新的更改才会在 Tomcat 中执行(如果我不这样做,则在 Tomcat 中不会执行前端和后端的任何更改)。

Basically here's what I noticed is happening:基本上这就是我注意到正在发生的事情:

First- If I don't check the Deploy applications configured in Tomcat instance , the Tomcat Server starts, but All the Jsp, Javascript, Html and EVEN Java aren't registered. First- If I don't check the Deploy applications configured in Tomcat instance , the Tomcat Server starts, but All the Jsp, Javascript, Html and EVEN Java aren't registered. (I can't send GET/POST requests to any of the endpoints) (我无法向任何端点发送 GET/POST 请求)

Second - I think what I'm missing is that I need to somehow, When I'm building/running the project, make the application save its latest changes (eg Target -> webapps -> project files folder) into the Tomcat webapps folder.第二-我认为我缺少的是我需要以某种方式构建/运行项目时,使应用程序将其最新更改(例如目标-> webapps->项目文件文件夹)保存到Tomcat webapps文件夹中. Thats what my wild guess is.这就是我的疯狂猜测。

I've been on this for several hours now, any help WILL BE APPRECIATED.我已经做了几个小时了,任何帮助都将不胜感激。

EDIT: Uploaded Tomcat Configuration and Project Structure编辑:上传 Tomcat 配置和项目结构

Tomcat配置

项目结构

The "Hot swap classes" option works when you launch TomCat in debug mode and it should be restricted only to the Java classes.当您在调试模式下启动 TomCat 时,“热交换类”选项有效,它应该仅限于 Java 类。

You could use "Update classes and resources" option to get the changes to the front-end resources.您可以使用“更新类和资源”选项来获取对前端资源的更改。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM