【问题标题】:JRebel does not working with Spring-Boot app in Intellij IDEAJRebel 不能在 Intellij IDEA 中使用 Spring-Boot 应用程序
【发布时间】:2019-08-27 10:02:35
【问题描述】:

我已经在 Intellij IDEA 中为 spring-boot 项目设置了 JRebel,我已按照所有步骤以正确的方式安装它,但它仍然无法正常工作,我有以下 pom.xml 配置:

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
</dependency>

           <plugin>
                <groupId>org.zeroturnaround</groupId>
                <artifactId>jrebel-maven-plugin</artifactId>
                <version>1.1.7</version>
                <configuration>
                    <addResourcesDirToRebelXml>true</addResourcesDirToRebelXml>
                </configuration>
                <executions>
                    <execution>
                        <id>generate-rebel-xml</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

方框也被选中:

有趣的是,当我对源代码进行更改然后转到字节码或 .properties 时,我可以看到所做的更改,但前端没有任何变化...... 每次编译更改的文件时,我都可以在事件日志中看到以下消息:

从中我可以得出结论,应该应用更改。 我正在使用提供 spring-boot 的开箱即用的 servlet 容器,如果我没记错的话,那就是 - Tomcat。 如果有人知道,你能帮我看看我哪里错了吗?

【问题讨论】:

    标签: spring-boot intellij-idea jrebel


    【解决方案1】:

    如何启动您的 SpringBoot 应用程序?使用 IntelliJ 中的开始按钮还是使用命令行?如果您确保 JRebel 面板中的复选框生成一个名为“rebel.xml”的文件,我认为您可以从 Maven pom.xml 中删除 JRebel 插件。如果生成了 rebel.xml pom,只需验证它的内容是否指向包含已编译类的文件夹。之后,运行“mvn clean compile package”并再次重新运行您的应用程序。如果您使用 IntelliJ 中的按钮启动应用程序,请使用 JRebel 按钮而不是普通按钮。如果从命令行,请按照插件菜单中的说明进行操作。

    【讨论】:

      猜你喜欢
      • 2016-03-29
      • 2016-12-28
      • 1970-01-01
      • 2016-03-15
      • 1970-01-01
      • 2018-02-17
      • 2017-10-21
      • 2015-03-25
      • 2021-10-28
      相关资源
      最近更新 更多