2018-10-12 09:40
非常感谢你的回答。
我把pom文件的
org.apache.cxf
cxf-rt-transports-http-jetty
3.1.6
改为了
org.apache.cxf
cxf-rt-transports-http
3.1.11
,
运行时不再报jetty相关异常,出现了
Exception in thread "main" org.apache.cxf.service.factory.ServiceConstructionException
at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:217)
at com.medex.service.Server.main(Server.java:33)
Caused by: java.io.IOException: Cannot find any registered HttpDestinationFactory from the Bus.
at org.apache.cxf.transport.http.HTTPTransportFactory.getDestination(HTTPTransportFactory.java:269)
at org.apache.cxf.endpoint.ServerImpl.initDestination(ServerImpl.java:84)
at org.apache.cxf.endpoint.ServerImpl.(ServerImpl.java:63)
at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:173)
... 1 more
下面是我pom文件主要的部分:
org.apache.cxf
cxf-rt-frontend-jaxrs
3.1.11
org.apache.cxf
cxf-rt-transports-http
3.1.11
org.apache.cxf
cxf-rt-rs-client
3.1.11
org.springframework.boot
spring-boot-starter-jersey
1.5.16.RELEASE
org.codehaus.jackson
jackson-jaxrs
1.9.13