Spring boot Spring boot、apache camel和hawtio:无法向端点发送消息

Spring boot Spring boot、apache camel和hawtio:无法向端点发送消息,spring-boot,apache-camel,hawtio,Spring Boot,Apache Camel,Hawtio,我正在尝试使用ApacheCamel将hawtio集成到spring引导应用程序中。我遵循并添加了来自的HawtioConfiguration(不在io.hawt.web包中的kubeservice和kubepod除外) 因此,这是可行的,直到我尝试手动从hawtio接口()向直接端点发送消息为止。出现以下警告,但未发送任何消息: Camel does not support sending to this endpoint. 那么,我忘了什么吗?以下是我的设置:springboot 1.3.

我正在尝试使用ApacheCamel将hawtio集成到spring引导应用程序中。我遵循并添加了来自的HawtioConfiguration(不在io.hawt.web包中的kubeservice和kubepod除外)

因此,这是可行的,直到我尝试手动从hawtio接口()向直接端点发送消息为止。出现以下警告,但未发送任何消息:

Camel does not support sending to this endpoint.
那么,我忘了什么吗?以下是我的设置:springboot 1.3.3.RELEASE,具有以下依赖项:

    <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-spring-boot-starter</artifactId>
        <version>2.17.0</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-jdbc</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-jersey</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-actuator</artifactId>
    </dependency>

    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>io.hawt</groupId>
        <artifactId>hawtio-springboot</artifactId>
        <version>1.4.64</version>
    </dependency>
    <dependency>
        <groupId>io.hawt</groupId>
        <artifactId>hawtio-core</artifactId>
        <version>1.4.64</version>
    </dependency>
谢谢

编辑:使用hawtio作为一个独立的应用程序并连接到springboot可以很好地工作

edit2:接下来,我将hawtio用作另一个项目(同一版本)的战争,部署在Tomcat7上。同一问题,无法发送到直接终结点。
如图所示。

将hawtio用作war的选项与使用spring boot和camel的应用程序配合得非常好,我已经成功地使用了它。 检查hawtio github代码示例,它包含了很好的示例


此外,我还将与使用hawtio wat或作为maven插件的示例共享我的github链接。

我遇到了相同的问题:我无法使用hawt.io发送到直接端点(或任何其他端点)。也许这是hawt.io中的一个通用Bug/未实现的特性

然而,以下是可能的:

  • 复制端点URL
  • 在hawt.io中选择上下文节点
  • 点击“操作”
  • 使用sendStringBody方法(java.lang.String、java.lang.String)向该端点发送字符串
  • 第一个参数是可以粘贴的端点URI

我在hawtio网站上找到了一个war,通过“连接”面板连接到spring boot也得到了同样的结果。我可以查看和监视我的路由,但无法向其中一个发送消息
@SpringBootApplication
@EnableHawtio
@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})
public class Application {

    @Autowired
    private ServletContext servletContext;

    public static void main(String[] args) {
         System.setProperty(AuthenticationFilter.HAWTIO_AUTHENTICATION_ENABLED, "false");
        SpringApplication.run(Application.class, args);
    }
    @PostConstruct
    public void init() {
        final ConfigManager configManager = new ConfigManager();
        configManager.init();
        servletContext.setAttribute("ConfigManager", configManager);
    }
}