2013-02-05 49 views
1

我想應用安全(基本認證,例如)到我的Rest-WS。這些WS通過DOSGi發佈在Karaf容器中。卡拉夫容器,休息WS和春季安全

<!-- 
    Register VCPENetworkManager as OSGi Service 
    -->  
<bean id="vcpeNetworkManager" class="org.opennaas.extensions.vcpe.manager.VCPENetworkManager"/> 
<service ref="vcpeNetworkManager" interface="org.opennaas.extensions.vcpe.manager.IVCPENetworkManager"> 
    <service-properties> 
     <!-- Rest --> 
     <entry key="service.exported.interfaces" value="*"/> 
     <entry key="service.exported.configs" value="org.apache.cxf.rs"/> 
     <entry key="service.exported.intents" value="HTTP"/>   
     <entry key="org.apache.cxf.ws.address" value="${ws.rest.url}/vcpenetwork"/> 
    </service-properties> 
</service> 

我需要幫助,所以我不知道是什麼的依賴在發佈WS或如何或在哪裏包括彈簧的配置文件捆綁相加。我一直使用應用程序服務器。

感謝,

+0

Spring Security具有很好的書面文檔。你可以從這裏開始依賴關係http://static.springsource.org/spring-security/site/docs/3.2.x/reference/springsecurity-single.html#appendix-dependencies,以及這裏的配置:http:// static .springsource.org/spring-security/site/docs/3.2.x/reference/springsecurity-single.html#ns-config –

+0

是的,我以前曾在一個典型的webb應用程序中使用spring,但我的問題是如何配置它一個osgi容器。 – user2043734

+0

對不起,我完全錯過了OSGi環境。 –

回答

0

如果您使用CXF的DOSGi我會使用它與藍圖表明,它就像XML語法彈簧和在OSGi環境效果最好。