成人午夜视频全免费观看高清-秋霞福利视频一区二区三区-国产精品久久久久电影小说-亚洲不卡区三一区三区一区

springcxf配置

版本 -- cxf-2.5.2

成都創(chuàng)新互聯(lián)公司專業(yè)提供成都主機(jī)托管四川主機(jī)托管成都服務(wù)器托管四川服務(wù)器托管,支持按月付款!我們的承諾:貴族品質(zhì)、平民價(jià)格,機(jī)房位于中國(guó)電信/網(wǎng)通/移動(dòng)機(jī)房,溫江服務(wù)器托管服務(wù)有保障!

<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:jaxws="http://cxf.apache.org/jaxws"

xmlns:cxf="http://cxf.apache.org/core"

xsi:schemaLocation="http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd

http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">

         <!-- 引入cxf配置文件 -->

<import resource="classpath:META-INF/cxf/cxf.xml" />

<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />

<!-- IP地址輸入攔截器 -->  

<bean id="addressInInterceptor"  class="com.webservice.impl.util.AddressInInterceptor" />  

<!--  全局?jǐn)r截器Bus  也可以使用局部攔截器配置-->

<!--

<cxf:bus>    

   <cxf:inInterceptors>    

       <ref bean="addressInInterceptor" />    

   </cxf:inInterceptors>    

</cxf:bus>  

--> 

<!-- 用戶信息-->

<bean id="userDetailsServiceImpl" class="com.webservice.impl.UserDetailsServiceImpl"/>

<jaxws:endpoint    

id="userDetailsService"    

implementor="#userDetailsServiceImpl" 

implementorClass="com.webservice.impl.UserDetailsServiceImpl"

address="/userDetailsService" >

<jaxws:inInterceptors>  

<ref bean="addressInInterceptor" />  

</jaxws:inInterceptors>

</jaxws:endpoint> 

</beans>

地址攔截 白名單  

public class AddressInInterceptor extends AbstractPhaseInterceptor<Message> {  

@Resource

com.hotent.platform.service.system.SysAcceptIpService sysAcceptIpService;

    public AddressInInterceptor() {  

        super(Phase.RECEIVE);  

    }  

    

    /**

     *攔截器過濾方法。 

     */

    public void handleMessage(Message message) throws Fault {  

        HttpServletRequest request = (HttpServletRequest) message.get(AbstractHTTPDestination.HTTP_REQUEST);  

        String ipAddr=request.getRemoteAddr();

        if(!accept(ipAddr)) 

throw new Fault(new IllegalAccessException("ip地址" + ipAddr + " 拒絕訪問"));        

    }  

}

    

訪問地址: http://ip:port/project/service/SystemResourcesService?wsdl

網(wǎng)站名稱:springcxf配置
文章分享:http://jinyejixie.com/article20/iicsco.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供搜索引擎優(yōu)化、動(dòng)態(tài)網(wǎng)站、品牌網(wǎng)站建設(shè)、手機(jī)網(wǎng)站建設(shè)、響應(yīng)式網(wǎng)站、網(wǎng)站維護(hù)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

小程序開發(fā)
金坛市| 凯里市| 新丰县| 法库县| 招远市| 屏南县| 镇宁| 都安| 左贡县| 和平县| 慈利县| 永济市| 商洛市| 明水县| 大关县| 慈溪市| 万宁市| 阿坝| 平度市| 隆化县| 平原县| 延川县| 承德市| 墨江| 东宁县| 慈溪市| 绥棱县| 东辽县| 繁昌县| 永修县| 磴口县| 四子王旗| 雷波县| 冕宁县| 唐河县| 蚌埠市| 赣榆县| 青河县| 揭阳市| 尚志市| 于田县|