springcxf配置
版本 -- cxf-2.5.2
成都创新互联公司专业提供成都主机托管四川主机托管成都服务器托管四川服务器托管,支持按月付款!我们的承诺:贵族品质、平民价格,机房位于中国电信/网通/移动机房,温江服务器托管服务有保障!
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"> id="userDetailsService" implementor="#userDetailsServiceImpl" implementorClass="com.webservice.impl.UserDetailsServiceImpl" address="/userDetailsService" >
地址拦截 白名单
public class AddressInInterceptor extends AbstractPhaseInterceptor
@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
新闻标题:springcxf配置
网站路径:http://ybzwz.com/article/iicsco.html