Apache CXF 버전 2.4.0을 사용하고 있습니다. 나는 편안한 서비스를 만들기 위해 노력하고있다.2.4.0에서 Apache CXF RS 확장 문제가 발생했습니다.
아래 예제는 2.3.4에서 작동하지만 2.4.0에서는 작동하지 않습니다. 콩 설정 파일에서 어떻게 다르게해야합니까?
빈 구성 파일에 아래 xml 행을 포함 할 때.
<import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml" />
나는 다음과 같은 스택 트레이스의 오류 :
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml]
Offending resource: ServletContext resource [/WEB-INF/beans.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException:
IOException parsing XML document from class path resource [META-INF/cxf/cxf-extension-jaxrs-binding.xml]; nested exception is java.io.FileNotFoundException: class path resource [META-INF/cxf/cxf-extension-jaxrs-binding.xml] cannot be opened because it does not exist at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)
내 POM 의존성은 다음과 같습니다. 이것은 2.3.4에서는 작동하지만 2.4.0에서는 작동하지 않습니다. 어떤 제안? 해당 XML 확장 줄을 더 이상 사용되지 않거나 다른 병에 포함 시켰습니까?
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-bundle-jaxrs</artifactId>
<version>2.3.4</version>
<exclusions>
<exclusion>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
</exclusion>
</exclusions>
</dependency>
그것은 나를 위해 작동하지 않았다 ... 내가 아파치 2.2.3 버전을했을 때 나는 그것을하고있는 것처럼 json을 보낼 수 없다. "응답 클래스에 대해 메시지 본문 작성자가 없습니다"라는 응답을 얻습니다. 뭔가 제안하기 – Bhuvan