<aop:scoped-proxy/>
cxf 構成ファイルに以下を追加する必要がある場合があります。
<jaxrs:server id="example" address="/">
<jaxrs:serviceBeans>
<bean class="org.apache.cxf.systest.jaxrs.CustomerService">
<aop:scoped-proxy />
</bean>
</jaxrs:serviceBeans>
</jaxrs:server>
また、messageContext のセッター メソッドを作成する必要があります (これはサービス クラスにある必要があります。ここでは "org.apache.cxf.systest.jaxrs.CustomerService" です)。
private MessageContext messageContext;
@Context
public void setMessageContext(MessageContext messageContext) {
this.messageContext = messageContext;
}
このドキュメント リンクも考慮してください:
http://cxf.apache.org/docs/jaxrs-services-configuration.html#JAXRSServicesConfiguration-FromSpring