【发布时间】:2015-02-20 05:12:35
【问题描述】:
我正在开发一个使用 camel 和 cxf 的 spring-boot 应用程序。我还包括 spring-boot-starter-actuator。在将应用程序作为可执行 jar 或部署到 Tomcat 8 的 war 执行时,执行器端点(例如 /beans、/info、/env)工作正常。但是,当我将相同的 war 部署到 JBoss EAP 6(AS 7)时执行器端点返回 404 的 http 状态。我已尝试根据文档在我的 pom.xml 中包含以下依赖项,但没有成功。
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
<scope>provided</scope>
</dependency>
我的应用程序类看起来像
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.web.SpringBootServletInitializer;
import org.springframework.context.ApplicationContext;
import org.springframework.web.WebApplicationInitializer;
import java.util.Arrays;
@SpringBootApplication
public class EsbApplication extends SpringBootServletInitializer {
public static void main(String[] args) {
SpringApplication.run(EsbApplication.class, args);
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(EsbApplication.class);
}
}
关于如何让执行器端点在 JBoss EAP 中工作的任何想法
谢谢!
【问题讨论】:
标签: java jboss7.x spring-boot