Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/spring-boot/5.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
作为web应用程序运行spring云流应用程序_Spring_Spring Boot_Spring Cloud Stream - Fatal编程技术网

作为web应用程序运行spring云流应用程序

作为web应用程序运行spring云流应用程序,spring,spring-boot,spring-cloud-stream,Spring,Spring Boot,Spring Cloud Stream,我有一个springcloudstream应用程序,我也想作为web应用程序运行。我需要点击查看应用程序是否符合健康检查的原因。我有以下依赖项,但它会启动tomcat,我得到的错误是无法在端口8080上建立连接 compile 'org.springframework.boot:spring-boot-starter-web' compile 'org.springframework.boot:spring-boot-starter-amqp' compile 'org.

我有一个springcloudstream应用程序,我也想作为web应用程序运行。我需要点击查看应用程序是否符合健康检查的原因。我有以下依赖项,但它会启动tomcat,我得到的错误是无法在端口8080上建立连接

    compile 'org.springframework.boot:spring-boot-starter-web'
    compile 'org.springframework.boot:spring-boot-starter-amqp'
    compile 'org.springframework.cloud:spring-cloud-stream'
    compile 'org.springframework.cloud:spring-cloud-stream-binder-rabbit'

    compile 'org.springframework.boot:spring-boot-starter-actuator'
    compile 'org.glassfish.jersey.core:jersey-client:2.23'
有没有办法达到我想要达到的目标

如中所述,只要在类路径中包含
spring boot starter web
spring boot starter actuator
依赖项,就应该能够访问执行器端点

通过对以下命令的修改,您可以再次检查它们是否在类路径中:

jar tvf YOUR-APP.jar | grep致动器

此外,从Boot 2.0开始,默认情况下禁用了执行器端点的显示


因此,根据使用的版本,您可能还必须使用
management.endpoints.web.exposure.include=*
key/value对启动应用程序,以便启用它们,并且您可以通过HTTP访问它们。

您使用的是哪个版本的Spring Boot和Cloud?我刚刚用这些依赖项创建了一个演示应用程序,Spring Boot 2.1.6.RELEASE和Spring Cloud Greenwich.SR2,我可以启动该应用程序并毫无问题地转到。你有没有试着去代替(你在帖子中提到的)