Spring 集成JAX-WS的小栗子

代码地址:spring-webservice

代码解析

先来看下服务端

WSServerInterface.java

@WebService
public interface WSServerInterface {

    @WebMethod(operationName = "getAsXml")
    String getDeptListAsXML();
    @WebMethod(operationName = "getAsList")
    List<Department> getDeptList();
}

通过@WebService注解标注这是一个用于暴露WebService的接口。
同时,接口声明了两个方法,这两个方法将会是WebService所暴露出去的服务方法。

WSServer.java

/**
 * webService服务提供类的实现,
 * 主要在这里实现webService返回类型的转换, 例子中是从List转换成xml格式
 *
 * @author <a href="mailto: 393803588@qq.com">刘涵(Hanl)</a>
 *         By 2016/11/21
 */
@Component
@WebService(serviceName = "hanTest",
        endpointInterface = "com.han.wsdemo.ws.WSServerInterface",
        targetNamespace = "com.han.wsdemo.ws.WSServerInterface"
)
public class WSServer implements WSServerInterface {

    /**
     * 注入业务Service获取数据
     */
    @Resource
    BizService bizService;

    /**
     * 获取xml格式的数据
     *
     * @return
     */
    @Override
    public String getDeptListAsXML() {
        List<Department> list = bizService.getDeptList();
        return XMLUtils.convertToXML("departments", list);
    }

    /**
     * 获取list格式的数据
     *
     * @return
     */
    @Override
    public List<Department> getDeptList() {
        return bizService.getDeptList();
    }

这里同样使用了@WebService注解进行标注,不过重点参数是endpointInterface,这个参数指明了该服务的实现类实现的是哪个服务接口。
而其他的几个属性参数主要是为了自定义一些WebService的元信息,方便客户端调用时使用。

@Component注解主要是将该类注册为Spring管理的bean,同样可以使用xml的方式去配置。

spring-ws-server.xml

<bean class="org.springframework.remoting.jaxws.SimpleJaxWsServiceExporter">
        <property name="baseAddress" value="http://127.0.0.1:8089/"/>
</bean>

在服务端的spring配置文件中,我们使用SimpleJaxWsServiceExporter来为我们的WebService暴露HTTP服务,这个类会启动一个内部的HttpServer,
因此服务的暴露其实并不依赖于像SpringMVC这样的web服务,但需要注意的是它同样需要依赖servlet-api

有了以上的准备之后,就可以启动spring,是WebService运行起来。

Server.java

public class Server {

    public static void main(String[] args) throws IOException {
        ApplicationContext context = new ClassPathXmlApplicationContext("spring-ws-server.xml");
        // 这里有个小技巧,让main程序一直监听控制台输入,异步的代码就可以一直在执行。不同于while(ture)的是,按回车或esc可退出
        new BufferedReader(new InputStreamReader(System.in)).readLine();
    }
}

我这里为了方便,直接使用了ClassPathXmlApplicationContext的方式加载,实际上也可以集成SpringMVC通过web容器加载启动Spring上下文。

成功暴露出服务了:http://localhost:8089/hanTest?wsdl

<definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="com.han.wsdemo.ws.WSServerInterface" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="com.han.wsdemo.ws.WSServerInterface" name="hanTest">
    <import namespace="http://ws.wsdemo.han.com/" location="http://localhost:8089/hanTest?wsdl=1"/>
    <binding xmlns:ns1="http://ws.wsdemo.han.com/" name="WSServerPortBinding" type="ns1:WSServerInterface">
        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
        <operation name="getAsList">
            <soap:operation soapAction=""/>
            <input>
                <soap:body use="literal"/>
            </input>
            <output>
                <soap:body use="literal"/>
            </output>
        </operation>
        <operation name="getAsXml">
            <soap:operation soapAction=""/>
            <input>
                <soap:body use="literal"/>
            </input>
            <output>
                <soap:body use="literal"/>
            </output>
        </operation>
    </binding>
    <service name="hanTest">
        <port name="WSServerPort" binding="tns:WSServerPortBinding">
            <soap:address location="http://localhost:8089/hanTest"/>
        </port>
    </service>
</definitions>

以上一个简单的WebService服务端就完成了。

再看下客户端

spring-ws-client.xml

    <bean id="wsService" class="org.springframework.remoting.jaxws.JaxWsPortProxyFactoryBean">
        <property name="serviceInterface" value="com.han.wsdemo.ws.WSServerClientInterface"/>
        <property name="wsdlDocumentUrl" value="http://localhost:8089/hanTest?wsdl"/>
        <property name="namespaceUri" value="com.han.wsdemo.ws.WSServerInterface"/>
        <property name="serviceName" value="hanTest"/>
        <property name="portName" value="WSServerPort" />
    </bean>

这里通过注册一个JaxWsPortProxyFactoryBean类型的Bean来获取WebService的代理,之后就可以使用这个代理对象来完成webService的调用。
这里有几个必须选的配置参数

serviceInterface - 要代理的服务接口

wsdlDocumentUrl - wsdl的访问地址

namespaceUri - definitions节点的targetNamespace

serviceName - service节点的name

portName - port节点的name

WSServerClientInterface.java

@WebService
public interface WSServerClientInterface {
    @WebMethod(operationName = "getAsXml")
    String getDeptListAsXML();
    @WebMethod(operationName = "getAsList")
    List<Department> getDeptList();
}

这里要代理的服务接口可以根据wsdl直接生成,也可以参照wsdl的描述来自己写出来。
@WebService注解表示这是一个WebService的接口
@WebMethod指定了方法对应的wsdl中的operation

有了服务定义的接口,以及Spring配置的代理对象,就可以注入使用这个bean来完成WebService的调用了。

public class Client {

    public static void main(String[] args) {
        /**
         * 启动spring
         */
        ApplicationContext context = new ClassPathXmlApplicationContext("spring-ws-client.xml");

        /**
         * 这里就可以注入webService的客户端代理类
         */
        WSServerClientInterface server = (WSServerClientInterface) context.getBean("wsService");
        System.out.println("=================== XML Response ===================");
        System.out.println(server.getDeptListAsXML());

        List<Department> list =server.getDeptList();    // 这里说明webService可以支持list类型的值传递

        System.out.println("===================== List Response ==================");
        list.forEach(System.out::println);
    }
}

这里为了方便,直接使用了ClassPathXmlApplicationContext的方式加载,实际应用中也可能是通过web容器加载启动的spring上下文。

运行结果:

/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/bin/java -Didea.launcher.port=7538 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/ext/jaccess.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/ext/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/ext/nashorn.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/javaws.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/jfxswt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/management-agent.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/plugin.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/lib/ant-javafx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/lib/javafx-mx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/lib/packager.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/lib/tools.jar:/Users/hanl/Documents/workspace/ideaWork/spring-webservice/target/classes:/Users/hanl/.m2/repository/org/springframework/spring-core/4.3.3.RELEASE/spring-core-4.3.3.RELEASE.jar:/Users/hanl/.m2/repository/commons-logging/commons-logging/1.2/commons-logging-1.2.jar:/Users/hanl/.m2/repository/org/springframework/spring-web/4.3.3.RELEASE/spring-web-4.3.3.RELEASE.jar:/Users/hanl/.m2/repository/org/springframework/spring-aop/4.3.3.RELEASE/spring-aop-4.3.3.RELEASE.jar:/Users/hanl/.m2/repository/org/springframework/spring-beans/4.3.3.RELEASE/spring-beans-4.3.3.RELEASE.jar:/Users/hanl/.m2/repository/org/springframework/spring-context/4.3.3.RELEASE/spring-context-4.3.3.RELEASE.jar:/Users/hanl/.m2/repository/org/springframework/spring-expression/4.3.3.RELEASE/spring-expression-4.3.3.RELEASE.jar:/Users/hanl/.m2/repository/org/springframework/spring-webmvc/4.3.3.RELEASE/spring-webmvc-4.3.3.RELEASE.jar:/Users/hanl/.m2/repository/org/springframework/ws/spring-ws-core/2.4.0.RELEASE/spring-ws-core-2.4.0.RELEASE.jar:/Users/hanl/.m2/repository/org/springframework/ws/spring-xml/2.4.0.RELEASE/spring-xml-2.4.0.RELEASE.jar:/Users/hanl/.m2/repository/org/springframework/spring-oxm/4.3.3.RELEASE/spring-oxm-4.3.3.RELEASE.jar:/Users/hanl/.m2/repository/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.jar:/Users/hanl/.m2/repository/org/slf4j/slf4j-api/1.7.5/slf4j-api-1.7.5.jar:/Users/hanl/.m2/repository/ch/qos/logback/logback-classic/1.0.13/logback-classic-1.0.13.jar:/Users/hanl/.m2/repository/ch/qos/logback/logback-core/1.0.13/logback-core-1.0.13.jar:/Users/hanl/.m2/repository/com/alibaba/fastjson/1.2.20/fastjson-1.2.20.jar:/Users/hanl/.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar:/Users/hanl/.m2/repository/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar" com.intellij.rt.execution.application.AppMain com.han.wsdemo.boot.Client
十一月 22, 2016 12:03:13 上午 org.springframework.context.support.ClassPathXmlApplicationContext prepareRefresh
信息: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@7aec35a: startup date [Tue Nov 22 00:03:13 CST 2016]; root of context hierarchy
十一月 22, 2016 12:03:13 上午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
信息: Loading XML bean definitions from class path resource [spring-ws-client.xml]
=================== XML Response ===================
<?xml version="1.0" encoding="UTF-8"?>
<departments><department><name>xx部门</name><id>1</id><users><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user></users></department><department><name>xx部门</name><id>1</id><users><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user></users></department><department><name>xx部门</name><id>1</id><users><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user></users></department><department><name>xx部门</name><id>1</id><users><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user></users></department><department><name>xx部门</name><id>1</id><users><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user></users></department><department><name>xx部门</name><id>1</id><users><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user></users></department><department><name>xx部门</name><id>1</id><users><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user></users></department><department><name>xx部门</name><id>1</id><users><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user></users></department><department><name>xx部门</name><id>1</id><users><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user></users></department><department><name>xx部门</name><id>1</id><users><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user><user><name>liuhan</name><userId>1</userId></user></users></department></departments>
===================== List Response ==================
Department{id=1, name='xx部门', users=[User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}]}
Department{id=1, name='xx部门', users=[User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}]}
Department{id=1, name='xx部门', users=[User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}]}
Department{id=1, name='xx部门', users=[User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}]}
Department{id=1, name='xx部门', users=[User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}]}
Department{id=1, name='xx部门', users=[User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}]}
Department{id=1, name='xx部门', users=[User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}]}
Department{id=1, name='xx部门', users=[User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}]}
Department{id=1, name='xx部门', users=[User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}]}
Department{id=1, name='xx部门', users=[User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}, User{userId=1, name='liuhan'}]}

Process finished with exit code 0

©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 210,914评论 6 490
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 89,935评论 2 383
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 156,531评论 0 345
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 56,309评论 1 282
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 65,381评论 5 384
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 49,730评论 1 289
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 38,882评论 3 404
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 37,643评论 0 266
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 44,095评论 1 303
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 36,448评论 2 325
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 38,566评论 1 339
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 34,253评论 4 328
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 39,829评论 3 312
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 30,715评论 0 21
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 31,945评论 1 264
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 46,248评论 2 360
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 43,440评论 2 348

推荐阅读更多精彩内容

  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 134,626评论 18 139
  • Spring Boot 参考指南 介绍 转载自:https://www.gitbook.com/book/qbgb...
    毛宇鹏阅读 46,771评论 6 342
  • 什么是Spring Spring是一个开源的Java EE开发框架。Spring框架的核心功能可以应用在任何Jav...
    jemmm阅读 16,445评论 1 133
  • spring官方文档:http://docs.spring.io/spring/docs/current/spri...
    牛马风情阅读 1,650评论 0 3
  • 周五下午,整个单位都沉浸在即将放假的轻松氛围中,走廊里偶尔传来隔壁办公室的笑声,家住外地、只有周末才回家的同...
    游迈阅读 268评论 0 1