Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Spring cxf configuration

Shulou Source: shulou.com Published: 2022-06-03 08:04:01 09月23日 Update

Version-cxf-2.5.2

Address blocking whitelist

Public class AddressInInterceptor extends AbstractPhaseInterceptor {

@ Resource

Com.hotent.platform.service.system.SysAcceptIpService sysAcceptIpService

Public AddressInInterceptor () {

Super (Phase.RECEIVE)

}

/ * *

* interceptor filtering method.

, /

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 address" + ipAddr + "access denied"))

}

}

Access address: http://ip:port/project/service/SystemResourcesService?wsdl

Tags: Address list method version interceptor configuration Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information MySQL Apple Shulou Tech Info Linux