我試圖將hawtio集成到使用apache駱駝的spring-boot應用程序中。我跟着Spring-Boot Embedded Wars和How to run hawt.io in spring boot application with embedded tomcat加入HawtioConfiguration(除kubeservice和kubepod其不在io.hawt.web包)春季啓動,apache駱駝和hawtio:不能發送消息到端點
所以,這樣的作品,最多的地方,我試圖manualy點發送消息到直接來自hawtio界面的端點(http://localhost:8080/hawtio/index.html#/camel/sendMessage?tab=camel&nid=root-org.apache.camel-camel-1-endpoints-%22direct:%2F%2Fdummy%22)。出現以下警告,並且不發送消息:
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>
和Application.java:
@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);
}
}
謝謝!
編輯:使用hawtio作爲一個獨立的應用程序,連接到springboot工作正常
EDIT2:移動上,我用hawtio作爲另一個項目(同版)一戰,部署在一個Tomcat 7相同的問題,不能發送到一個直接的端點。 去圖。
我得到了一個戰爭hawtio網站,並通過'連接'面板連接到彈簧引發產生相同的結果。我可以看到並監視我的路線,但無法發送消息給其中的一個 – jlb