Java Swagger Web服务不要在Tomcat服务器中运行,而是在Maven Tomee中运行



我有一个小问题。我创建了一些网站来测试Swagger ...Web服务仅恢复一个整数...(testWebService)当我从Projektfolder

开始时
mvn run:tomee

在那里工作正常,我可以与Postman一起测试,我成为我的整数值

但是,当我尝试在经典的tomcat服务器中部署战争文件时 ->没有...邮递员恢复了404错误,请记录emty

我在tomcat和tomee之间的/conf目录中合并了server.xml和web.xml,但我找不到其他

tomcat由apt-get在ubuntu 16.04 lts

上安装

tomcat正在运行,我可以从tomcat打开示例页面,我可以使用tomcat Manager部署我的战争文件

我需要帮助!

谢谢

编辑:/var/lib/tomcat8/log/catalina.out:

Nov 27, 2017 9:25:15 AM org.apache.catalina.core.StandardContext 
reload
INFORMATION: Reloading Context with name [/swagger-cxf-server-1.0.0] 
has started
Nov 27, 2017 9:25:16 AM org.apache.jasper.servlet.TldScanner scanJars
INFORMATION: At least one JAR was scanned for TLDs yet contained no 
TLDs. Enable debug logging for this logger for a complete list of JARs 
that were scanned but no TLDs were found in them. Skipping unneeded 
JARs during scanning can improve startup time and JSP compilation 
time.
Nov 27, 2017 9:25:16 AM org.apache.catalina.core.StandardContext 
reload
INFORMATION: Reloading Context with name [/swagger-cxf-server-1.0.0] 
is completed
Nov 27, 2017 9:28:20 AM org.apache.jasper.servlet.TldScanner scanJars
INFORMATION: At least one JAR was scanned for TLDs yet contained no 
TLDs. Enable debug logging for this logger for a complete list of JARs 
that were scanned but no TLDs were found in them. Skipping unneeded 
JARs during scanning can improve startup time and JSP compilation 
time.
Nov 27, 2017 9:36:27 AM org.apache.coyote.AbstractProtocol pause
INFORMATION: Pausing ProtocolHandler ["http-nio-8080"]
Nov 27, 2017 9:36:27 AM org.apache.catalina.core.StandardService 
stopInternal
INFORMATION: Stopping service Catalina
Nov 27, 2017 9:36:27 AM org.apache.coyote.AbstractProtocol stop
INFORMATION: Stopping ProtocolHandler ["http-nio-8080"]
Nov 27, 2017 9:36:27 AM org.apache.coyote.AbstractProtocol destroy
INFORMATION: Destroying ProtocolHandler ["http-nio-8080"]

您可以在此处查看完整的日志文件:https://paste.ubuntu.com/26057420/

这是pom.xml:

pom.xml:https://paste.ubuntu.com/26057900

我相信原因是因为 Tomcat<TomEE。因此,仅安装tomcat8可能还不够。猜猜这是关于一些jax-rs的东西,可以在容器侧找到。

来自Tomee Page

Apache Tomee,发音为" Tommy",是一个全部apache Java EE 6 Web 配置文件认证的堆栈中,Apache Tomcat是顶级狗。

您有两个选项(可以从Tomee网站的此下载页面找到这两个选项。)

  1. drop tomee plus webapp 战争当前的tomcat安装(最容易尝试使用)
  2. tomee plus plus 独立替换当前的tomcat安装(包括最合适的tomcatx,推荐选项

相关内容

  • 没有找到相关文章

最新更新