zoukankan      html  css  js  c++  java
  • java cxf webservice 监听所有IP

    public void StartWebService() throws Exception
        {
            JettyHTTPServerEngineFactory eg = new JettyHTTPServerEngineFactory();
            eg.createJettyHTTPServerEngine(9000,"http");
            
            
            WebServiceMethod webServiceMethod = new WebServiceMethod();
            ServerFactoryBean svrFactory = new ServerFactoryBean();
            svrFactory.setServiceClass(WebServiceMethod.class);
            svrFactory.setAddress("http://localhost:9000/Hello");
            svrFactory.setServiceBean(webServiceMethod);
            // svrFactory.getServiceFactory().setDataBinding(new
            // AegisDatabinding());    
            svrFactory.create();
        }


    http://cxf.547215.n5.nabble.com/Virtual-host-with-jetty-standalone-RS-WS-need-help-td3414715.html

    From Java, I THINK you can do something like:

    bus.getExtention(JettyHTTPServerEngine.class)
         .createJettyHTTPServerEngine(null, 8080, "http");

    and that will create the connector for the port on all hosts, not the one for
    the passed in host.    Not 100% sure though.
     

     

  • 相关阅读:
    战火魔兽CJQ圣印问题
    sublime插件总汇
    js引用类型
    一、vue的数据双向绑定的实现
    渲染机制
    帆布指纹识别
    call、apply与bind在理解
    webpack的世界
    line-height与vertical-align
    'abc' 转换成[a, b, c]一道面试题的思考
  • 原文地址:https://www.cnblogs.com/baishahe/p/2020734.html
Copyright © 2011-2022 走看看