【发布时间】:2017-06-13 05:09:14
【问题描述】:
我有一个 springboot 应用程序,我正尝试在 Openshift Tomcat 7(JBoss EWS 2.0)中部署它。重新启动服务器后,我会收到以下控制台消息
INFO: Deploying web application archive /var/lib/openshift/-----xxxx-----/app-root/runtime/dependencies/jbossews/webapps/api.war
Jun 13, 2017 12:54:41 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deployment of web application archive /var/lib/openshift/-----xxxx-----/app-root/runtime/dependencies/jbossews/webapps/api.war has finished in 67,610 ms
它说部署成功,但在部署时我没有得到经典的 spring 徽标(如下所示),并且所有 API 都给出 404。
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.5.2.RELEASE) I am not getting this in console.
下面是我的 servlet 初始化器
public class ServletInitializer extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(ApicApiNewApplication.class);
}
}
为什么会发生这种情况?
【问题讨论】:
标签: java spring tomcat spring-boot openshift