首页 > 解决方案 > 使用 Spring boot servlet contextPath 然后 DistributedCommandBus: 404

问题描述

我有两个 SpringBootApplication,A 和 B。A 发送命令,B 处理命令。

当 B 以非空开头时server.servlet.context-path,当 A 发送命令时显示异常

An error occurred while trying to dispatch a command on the DistributedCommandBus: 404 null

我将命令路由器配置为:

SpringCloudCommandRouter.builder().localServiceInstance(registration).discoveryClient(discoveryClient).routingStrategy(new AnnotationRoutingStrategy()).build()

尝试在以下位置发送命令时发生错误:

DistributedCommandBus: 404 null

标签: axoncontextpath

解决方案


推荐阅读