You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

在IntelliJ IDEA社区版中使用Tapestry,Live Class Reloading是否正常工作?

解决IntelliJ IDEA社区版下Tapestry Live Class Reloading不生效的问题

以下是针对这个问题的具体解决步骤:

  • 开启IDEA运行时自动编译

    1. 打开Settings(快捷键Ctrl+Alt+S),找到Build, Execution, Deployment > Compiler,勾选Build project automatically。
    2. 按Ctrl+Shift+A打开搜索框,输入Registry并进入,找到compiler.automake.allow.when.app.running选项并勾选,确保项目运行时IDEA能自动编译修改的文件。
  • 调整Maven Jetty插件配置
    在项目的pom.xml中,给jetty-maven-plugin添加扫描配置,让Jetty能检测到编译后的class文件变化:

    <plugin>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-maven-plugin</artifactId>
      <version>你的Jetty版本号</version>
      <configuration>
        <scanIntervalSeconds>2</scanIntervalSeconds>
        <scanTargets>
          <scanTarget>${project.build.directory}/classes</scanTarget>
        </scanTargets>
      </configuration>
    </plugin>
    

    保存配置后重启jetty:run命令。

  • 使用正确的编译触发方式
    修改页面类后,不要执行Rebuild Project,而是用Make Project(快捷键Ctrl+F9)完成增量编译,之后刷新浏览器即可看到变更。

  • 确认Tapestry运行模式配置
    检查src/main/resources/META-INF/tapestry-module.properties文件,确保以下配置正确:

    tapestry.production-mode=false
    tapestry.reload-enabled=true
    

内容的提问来源于stack exchange,提问作者Riccardo De Menna

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.08 00:22:12