Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/307.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring boot JRebel不重新加载更改_Spring Boot_Jhipster_Jrebel - Fatal编程技术网

Spring boot JRebel不重新加载更改

Spring boot JRebel不重新加载更改,spring-boot,jhipster,jrebel,Spring Boot,Jhipster,Jrebel,我有一个用jhipster(spring boot)构建的项目。 使用Eclipse IDE中的运行配置运行我的项目: clean spring-boot:run -Dmaven.test.skip="true" -Drebel.remoting_plugin="true" 每次保存更改时,jrebel都会给出如下错误: [2017-12-03 22:15:55] [Project my-project, server localhost] Connecting to server to sy

我有一个用jhipster(spring boot)构建的项目。
使用Eclipse IDE中的运行配置运行我的项目:

clean spring-boot:run -Dmaven.test.skip="true" -Drebel.remoting_plugin="true"
每次保存更改时,jrebel都会给出如下错误:

[2017-12-03 22:15:55] [Project my-project, server localhost] Connecting to server to sync project
[2017-12-03 22:15:55] Unexpected response from server. Raw Headers: {date=Sun, 03 Dec 2017 15:15:55 GMT, allow=GET, HEAD, expires=0, transfer-encoding=chunked, x-xss-protection=1; mode=block, x-content-type-options=nosniff, connection=keep-alive, content-type=application/json;charset=UTF-8, cache-control=no-cache, no-store, max-age=0, must-revalidate, pragma=no-cache, x-application-context=my-project:swagger,dev:8080}
[2017-12-03 22:15:55] Unexpected response from server. First kilobyte of content:
[2017-12-03 22:15:55] {
  "timestamp" : "2017-12-03T15:15:55.499+0000",
  "status" : 405,
  "error" : "Method Not Allowed",
  "exception" : "org.springframework.web.HttpRequestMethodNotSupportedException",
  "message" : "Request method 'POST' not supported",
  "path" : "/"
}

[2017-12-03 22:15:55] [Project my-project, server localhost] Synchronization failed! JRebel remote server did not respond. The remote server has to be started with the JVM argument: -Drebel.remoting_plugin=true.
[2017-12-03 22:15:55] Synchronization took 42 ms in total.
到底发生了什么? 如何解决这个问题

我的环境:
-macOS
-jRebel 7.1.3
-弹簧护套1.5.9.1释放

提前感谢。

TL;DR 不要使用
-Drebel.remoting\u plugin=true

而是从命令行使用Help>JRebel>Configuration>Startup>runlocal


长版本。 根据您的描述,听起来您正在自己的机器上运行Spring Boot应用程序

参数
-Drebel.remoting\u plugin=true
仅当实际应用程序位于与您正在使用的IDE(eclipse)不同的机器上时才应使用

您也不需要使用JRebelEclipse插件
synchronize
功能。JRebel本身将监视
target/classes
目录中类文件的更改。 当您使用Eclipse或
mvn compile
构建项目时,JRebel将检测更改并重新加载类

因此,删除remoting参数,而是使用以下说明:在Eclipse中,从命令行转到Help>JRebel>Configuration>Startup>runlocalfrom。然后选择JVM和Spring引导

找到Maven Spring引导插件的说明,并使用它们将JRebel代理添加到应用程序中


此外,您不能通过将JVM参数添加到命令末尾,将其添加到
spring boot:run
。相反,您应该将参数添加到
MAVEN_OPTS
环境参数中,或者使用
-Drun.jvmArguments=“-Dsome.argument”
TL;DR 不要使用
-Drebel.remoting\u plugin=true

而是从命令行使用Help>JRebel>Configuration>Startup>runlocal


长版本。 根据您的描述,听起来您正在自己的机器上运行Spring Boot应用程序

参数
-Drebel.remoting\u plugin=true
仅当实际应用程序位于与您正在使用的IDE(eclipse)不同的机器上时才应使用

您也不需要使用JRebelEclipse插件
synchronize
功能。JRebel本身将监视
target/classes
目录中类文件的更改。 当您使用Eclipse或
mvn compile
构建项目时,JRebel将检测更改并重新加载类

因此,删除remoting参数,而是使用以下说明:在Eclipse中,从命令行转到Help>JRebel>Configuration>Startup>runlocalfrom。然后选择JVM和Spring引导

找到Maven Spring引导插件的说明,并使用它们将JRebel代理添加到应用程序中



此外,您不能通过将JVM参数添加到命令末尾,将其添加到
spring boot:run
。相反,您应该将参数添加到
MAVEN_OPTS
环境参数中,或者使用
-Drun.jvmArguments=“-Dsome.argument”

传递它们,谢谢您的解释。按照您的建议,它在命令行上运行良好。谢谢您的解释。按照您的建议,它在命令行上运行良好。