DispatcherServlet的初始化過程

本文探討Spring MVC中DispatcherServlet是如何初始化的,DispatcherServlet初始化指的是init()生命周期方法被執行,而不是DispatcherServlet被實例化的過程。

DispatcherServlet類

DispatcherServlet的類層次如下圖所示

DispatcherServlet.png

不管DispatcherServlet被如何包裝,它本質上是一個servlet,servlet的生命周期是init -> service -> destroy,因此本文從init()方法入手分析DispatcherServlet的初始化過程。(如果你對servlet不熟悉,我建議你看一下這篇入門指南:Java Servlet完全教程

init()方法

DispatcherServlet的init()方法在父類HttpServletBean中定義,其代碼如下所示:

@Override
public final void init() throws ServletException {
    if (logger.isDebugEnabled()) {
        logger.debug("Initializing servlet '" + getServletName() + "'");
    }
    // Set bean properties from init parameters.
    PropertyValues pvs = new ServletConfigPropertyValues(getServletConfig(), this.requiredProperties);
    if (!pvs.isEmpty()) {
        try {
            BeanWrapper bw = PropertyAccessorFactory.forBeanPropertyAccess(this);
            ResourceLoader resourceLoader = new ServletContextResourceLoader(getServletContext());
            bw.registerCustomEditor(Resource.class, new ResourceEditor(resourceLoader, getEnvironment()));
            initBeanWrapper(bw);
            bw.setPropertyValues(pvs, true);
        }
        catch (BeansException ex) {
            if (logger.isErrorEnabled()) {
                logger.error("Failed to set bean properties on servlet '" + getServletName() + "'", ex);
            }
            throw ex;
        }
    }
    // Let subclasses do whatever initialization they like.
    initServletBean();
    if (logger.isDebugEnabled()) {
        logger.debug("Servlet '" + getServletName() + "' configured successfully");
    }
}
  • ServletConfigPropertyValues用于解析web.xml定義中<servlet>元素的子元素<init-param>中的參數值。
    若<init-param>元素如下,則ServletConfigPropertyValues就會擁有這些參數
    <servlet>
        <servlet-name>dispatcher</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>/WEB-INF/spring/dispatcherServlet.xml</param-value>
        </init-param>
        <load-on-startup>-1</load-on-startup>
    </servlet>
    
ServletConfigPropertyValues.png
  • BeanWrapper把DispatcherServlet當做一個Bean去處理,這也是HttpServletBean類名的含義。bw.setPropertyValues(pvs, true) 將上一步解析的servlet初始化參數值綁定到DispatcherServlet對應的字段上;
  • init()方法是一個模板方法,initBeanWrapper和initServletBean兩個方法由子類去實現。

initServletBean()方法

DispatcherServlet的initServletBean()方法在父類FrameworkServlet中定義,它調用initWebApplicationContext方法初始化DispatcherServlet自己的應用上下文:

@Override
protected final void initServletBean() throws ServletException {
    getServletContext().log("Initializing Spring FrameworkServlet '" + getServletName() + "'");
    if (this.logger.isInfoEnabled()) {
        this.logger.info("FrameworkServlet '" + getServletName() + "': initialization started");
    }
    long startTime = System.currentTimeMillis();

    try {
        this.webApplicationContext = initWebApplicationContext();
        initFrameworkServlet();
    }
    // 省略一些代碼
}

protected void initFrameworkServlet() throws ServletException {
}

初始化servlet應用上下文

initWebApplicationContext方法負責初始化DispatcherServlet自己的應用上下文,其代碼如下所示:

protected WebApplicationContext initWebApplicationContext() {
    WebApplicationContext rootContext =
            WebApplicationContextUtils.getWebApplicationContext(getServletContext());
    WebApplicationContext wac = null;

    if (this.webApplicationContext != null) {
        // A context instance was injected at construction time -> use it
        wac = this.webApplicationContext;
        if (wac instanceof ConfigurableWebApplicationContext) {
            ConfigurableWebApplicationContext cwac = (ConfigurableWebApplicationContext) wac;
            if (!cwac.isActive()) {
                // The context has not yet been refreshed -> provide services such as
                // setting the parent context, setting the application context id, etc
                if (cwac.getParent() == null) {
                    // The context instance was injected without an explicit parent -> set
                    // the root application context (if any; may be null) as the parent
                    cwac.setParent(rootContext);
                }
                configureAndRefreshWebApplicationContext(cwac);
            }
        }
    }
    if (wac == null) {
        // No context instance was injected at construction time -> see if one
        // has been registered in the servlet context. If one exists, it is assumed
        // that the parent context (if any) has already been set and that the
        // user has performed any initialization such as setting the context id
        wac = findWebApplicationContext();
    }
    if (wac == null) {
        // No context instance is defined for this servlet -> create a local one
        wac = createWebApplicationContext(rootContext);
    }
    if (!this.refreshEventReceived) {
        // Either the context is not a ConfigurableApplicationContext with refresh
        // support or the context injected at construction time had already been
        // refreshed -> trigger initial onRefresh manually here.
        onRefresh(wac);
    }
    if (this.publishContext) {
        // Publish the context as a servlet context attribute.
        String attrName = getServletContextAttributeName();
        getServletContext().setAttribute(attrName, wac);
        if (this.logger.isDebugEnabled()) {
            this.logger.debug("Published WebApplicationContext of servlet '" + getServletName() +
                    "' as ServletContext attribute with name [" + attrName + "]");
        }
    }
    return wac;
}

該方法的概要流程如下:

  1. 獲得ContextLoaderListener創建的根應用上下文;
  2. 為DispatcherServlet創建自己的應用上下文;
  3. 刷新DispatcherServlet自己的應用上下文。

獲得根應用上下文

利用WebApplicationContextUtils類的getWebApplicationContext靜態方法取得根應用上下文,相關代碼如下:

public static WebApplicationContext getWebApplicationContext(ServletContext sc) {
    return getWebApplicationContext(sc, WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE);
}

public static WebApplicationContext getWebApplicationContext(ServletContext sc, String attrName) {
    Assert.notNull(sc, "ServletContext must not be null");
    Object attr = sc.getAttribute(attrName);
    if (attr == null) {
        return null;
    }
    if (attr instanceof RuntimeException) {
        throw (RuntimeException) attr;
    }
    if (attr instanceof Error) {
        throw (Error) attr;
    }
    if (attr instanceof Exception) {
        throw new IllegalStateException((Exception) attr);
    }
    if (!(attr instanceof WebApplicationContext)) {
        throw new IllegalStateException("Context attribute is not of type WebApplicationContext: " + attr);
    }
    return (WebApplicationContext) attr;
}

前面文章指出根應用上下文已經通過ContextLoaderListener被容器初始化,其類型默認是XmlWebApplicationContext類,啟動過程中會將WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE(即org.springframework.web.context.WebApplicationContext.ROOT)和根應用上下文通過ServletContext.setAttribute設置到應用的ServletContext。


rootContext.png

創建DispatcherServlet的應用上下文

  1. 若this.webApplicationContext不為null,則說明DispatcherServlet在實例化期間已經被注入了應用上下文。這種情況發生在Spring Boot應用啟動時,由于父類FrameworkServlet實現了ApplicationContextAware接口,所以setApplicationContext回調函數被調用時將字段webApplicationContext設置為根應用上下文,注意這并不是在init()初始化方法中完成的,而是在實例化DispatcherServlet的過程中完成的。
@Override
public void setApplicationContext(ApplicationContext applicationContext) {
    if (this.webApplicationContext == null && applicationContext instanceof WebApplicationContext) {
        this.webApplicationContext = (WebApplicationContext) applicationContext;
        this.webApplicationContextInjected = true;
    }
}
  1. 若this.webApplicationContext為null,則說明DispatcherServlet在實例化期間沒有被注入應用上下文。首先通過findWebApplicationContext方法嘗試尋找先前創建的應用上下文。
protected WebApplicationContext findWebApplicationContext() {
    String attrName = getContextAttribute();
    if (attrName == null) {
        return null;
    }
    WebApplicationContext wac =
            WebApplicationContextUtils.getWebApplicationContext(getServletContext(), attrName);
    if (wac == null) {
        throw new IllegalStateException("No WebApplicationContext found: initializer not registered?");
    }
    return wac;
}

public String getContextAttribute() {
    return this.contextAttribute;
}

該方法從ServletContext的屬性中找到該servlet初始化屬性(<init-param>元素)contextAttribute的值對應的應用上下文,若沒有找到則報錯。

  • 找到的WebApplicationContext是其他servlet初始化時設置到ServletContext屬性中的,具體是由initWebApplicationContext方法最后幾行做的,其代碼如下。
    String attrName = getServletContextAttributeName();
    getServletContext().setAttribute(attrName, wac);
    
    public String getServletContextAttributeName() {
        return SERVLET_CONTEXT_PREFIX + getServletName();
    }
    
    public static final String SERVLET_CONTEXT_PREFIX = FrameworkServlet.class.getName() + ".CONTEXT.";
    
    可見設置的鍵值是FrameworkServlet.class.getName() + ".CONTEXT."加上servlet的<servlet-name>值。
  • 以下面的web.xml片段為例,MyServlet會被容器在啟動的時候初始化,而dispatcher則是延遲初始化,它們均是DispatcherServlet類型。MyServlet初始化時會在ServletContext中設置以org.springframework.web.servlet.FrameworkServlet.CONTEXT.MyServlet為鍵,XmlWebApplicationContext對象為值的屬性,當dispatcher初始化時,其contextAttribute值恰是由MyServlet初始化應用上下文時設置的鍵,因此dispatcher初始化時應用上下文就是MyServlet初始化的應用上下文(雖然從源碼分析如此但筆者并未在Spring MVC的文檔里找到與contextAttribute有關的資料)。
    <servlet>
        <servlet-name>MyServlet</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>/WEB-INF/spring/dispatcherServlet.xml</param-value>
        </init-param>
        <load-on-startup>0</load-on-startup>
    </servlet>
    <servlet>
        <servlet-name>dispatcher</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <init-param>
            <param-name>contextAttribute</param-name>
            <param-value>org.springframework.web.servlet.FrameworkServlet.CONTEXT.MyServlet</param-value>
        </init-param>
        <load-on-startup>-1</load-on-startup>
    </servlet>
    
  1. 若第2步沒有找到之前初始化的應用上下文那么就需要通過createWebApplicationContext方法為DispatcherServlet創建一個以根應用上下文為父的應用上下文。這個應用上下文的類型是由父類FrameworkServlet的contextClass字段指定的,可以在web.xml中配置,默認是XmlWebApplicationContext類型,可以參見DispatcherServlet配置文檔
protected WebApplicationContext createWebApplicationContext(ApplicationContext parent) {
    Class<?> contextClass = getContextClass();
    if (this.logger.isDebugEnabled()) {
        this.logger.debug("Servlet with name '" + getServletName() +
                "' will try to create custom WebApplicationContext context of class '" +
                contextClass.getName() + "'" + ", using parent context [" + parent + "]");
    }
    if (!ConfigurableWebApplicationContext.class.isAssignableFrom(contextClass)) {
        throw new ApplicationContextException(
                "Fatal initialization error in servlet with name '" + getServletName() +
                "': custom WebApplicationContext class [" + contextClass.getName() +
                "] is not of type ConfigurableWebApplicationContext");
    }
    ConfigurableWebApplicationContext wac =
            (ConfigurableWebApplicationContext) BeanUtils.instantiateClass(contextClass);

    wac.setEnvironment(getEnvironment());
    wac.setParent(parent);
    wac.setConfigLocation(getContextConfigLocation());

    configureAndRefreshWebApplicationContext(wac);

    return wac;
}

具體的創建過程如下:

  • 實例化contextClass指定類型的應用上下文,同時將根應用上下文設置為它的父上下文,并將<servlet>的contextConfigLocation初始化參數值設置到對應屬性;
  • 從代碼中拋出異常的條件看contextClass屬性指定的類必須實現ConfigurableWebApplicationContext接口,而不是文檔說明的WebApplicationContext接口,對此問題筆者咨詢了Spring作者,見SPR-17414
  • configureAndRefreshWebApplicationContext方法先進一步為DispatcherServlet自己的應用上下文設置了屬性,然后調用了各ApplicationContextInitializer實現類的回調函數,最后做了刷新操作實例化各單例bean,其代碼如下所示:
    protected void configureAndRefreshWebApplicationContext(ConfigurableWebApplicationContext wac) {
        if (ObjectUtils.identityToString(wac).equals(wac.getId())) {
            // The application context id is still set to its original default value
            // -> assign a more useful id based on available information
            if (this.contextId != null) {
                wac.setId(this.contextId);
            }
            else {
                // Generate default id...
                wac.setId(ConfigurableWebApplicationContext.APPLICATION_CONTEXT_ID_PREFIX +
                        ObjectUtils.getDisplayString(getServletContext().getContextPath()) + '/' + getServletName());
            }
        }
    
        wac.setServletContext(getServletContext());
        wac.setServletConfig(getServletConfig());
        wac.setNamespace(getNamespace());
        wac.addApplicationListener(new SourceFilteringListener(wac, new ContextRefreshListener()));
    
        // The wac environment's #initPropertySources will be called in any case when the context
        // is refreshed; do it eagerly here to ensure servlet property sources are in place for
        // use in any post-processing or initialization that occurs below prior to #refresh
        ConfigurableEnvironment env = wac.getEnvironment();
        if (env instanceof ConfigurableWebEnvironment) {
            ((ConfigurableWebEnvironment) env).initPropertySources(getServletContext(), getServletConfig());
        }
    
        postProcessWebApplicationContext(wac);
        applyInitializers(wac);
        wac.refresh();
    }
    
    protected void postProcessWebApplicationContext(ConfigurableWebApplicationContext wac) {
    }
    
    protected void applyInitializers(ConfigurableApplicationContext wac) {
        String globalClassNames = getServletContext().getInitParameter(ContextLoader.GLOBAL_INITIALIZER_CLASSES_PARAM);
        if (globalClassNames != null) {
            for (String className : StringUtils.tokenizeToStringArray(globalClassNames, INIT_PARAM_DELIMITERS)) {
                this.contextInitializers.add(loadInitializer(className, wac));
            }
        }
    
        if (this.contextInitializerClasses != null) {
            for (String className : StringUtils.tokenizeToStringArray(this.contextInitializerClasses, INIT_PARAM_DELIMITERS)) {
                this.contextInitializers.add(loadInitializer(className, wac));
            }
        }
    
        AnnotationAwareOrderComparator.sort(this.contextInitializers);
        for (ApplicationContextInitializer<ConfigurableApplicationContext> initializer : this.contextInitializers) {
            initializer.initialize(wac);
        }
    }
    
    applyInitializers方法執行各ApplicationContextInitializer的initialize回調函數,這里的ApplicationContextInitializer分為兩種:
    • 全局ApplicationContextInitializer類由部署描述符中名為globalInitializerClasses的<context-param>初始化參數指定;
    • DispatcherServlet自己的ApplicationContextInitializer類由部署描述符中<servlet>元素內名為contextInitializerClasses的<init-param>初始化參數指定;
    • 這兩個參數的值都是由各個類名組成的以逗號、分號或空白符分隔的字符串。
  1. 最后的疑問是部署描述符web.xml中的contextClass等參數是如何被綁定到FrameworkServlet類或DispatcherServlet類的對應字段的呢?這是由上文提到的init()方法中ServletConfigPropertyValues和BeanWrapper完成的。


    contextClass.png

刷新DispatcherServlet的應用上下文

onRefresh方法刷新DispatcherServlet自己的應用上下文,DispatcherServlet類重寫了父類FrameworkServlet的onRefresh方法,該方法調用initStrategies()方法實例化MultipartResolver、LocaleResolver、HandlerMapping、HandlerAdapter和ViewResolver等組件。

@Override
protected void onRefresh(ApplicationContext context) {
    initStrategies(context);
}

protected void initStrategies(ApplicationContext context) {
    initMultipartResolver(context);
    initLocaleResolver(context);
    initThemeResolver(context);
    initHandlerMappings(context);
    initHandlerAdapters(context);
    initHandlerExceptionResolvers(context);
    initRequestToViewNameTranslator(context);
    initViewResolvers(context);
    initFlashMapManager(context);
}

以實例化HandlerMapping的initHandlerMappings方法為例,其代碼如下:

private void initHandlerMappings(ApplicationContext context) {
    this.handlerMappings = null;

    if (this.detectAllHandlerMappings) {
        // Find all HandlerMappings in the ApplicationContext, including ancestor contexts.
        Map<String, HandlerMapping> matchingBeans =
                BeanFactoryUtils.beansOfTypeIncludingAncestors(context, HandlerMapping.class, true, false);
        if (!matchingBeans.isEmpty()) {
            this.handlerMappings = new ArrayList<HandlerMapping>(matchingBeans.values());
            // We keep HandlerMappings in sorted order.
            AnnotationAwareOrderComparator.sort(this.handlerMappings);
        }
    }
    else {
        try {
            HandlerMapping hm = context.getBean(HANDLER_MAPPING_BEAN_NAME, HandlerMapping.class);
            this.handlerMappings = Collections.singletonList(hm);
        }
        catch (NoSuchBeanDefinitionException ex) {
            // Ignore, we'll add a default HandlerMapping later.
        }
    }

    // Ensure we have at least one HandlerMapping, by registering
    // a default HandlerMapping if no other mappings are found.
    if (this.handlerMappings == null) {
        this.handlerMappings = getDefaultStrategies(context, HandlerMapping.class);
        if (logger.isDebugEnabled()) {
            logger.debug("No HandlerMappings found in servlet '" + getServletName() + "': using default");
        }
    }
}
  • handlerMappings是DispatcherServlet的一個List<HandlerMapping>;
  • detectAllHandlerMappings是DispatcherServlet的一個布爾值屬性,表示是否要發現所有的HandlerMapping,若為true則從DispatchServlet自己的應用上下文和根應用上下文獲得所有已實例化的HandlerMapping單例,否則只獲取名為handlerMapping的HandlerMapping單例;
  • 若不存在已實例化的HandlerMapping,那么用默認策略實例化HandlerMapping。

用getDefaultStrategies方法獲取默認策略:

protected <T> List<T> getDefaultStrategies(ApplicationContext context, Class<T> strategyInterface) {
    String key = strategyInterface.getName();
    String value = defaultStrategies.getProperty(key);
    if (value != null) {
        String[] classNames = StringUtils.commaDelimitedListToStringArray(value);
        List<T> strategies = new ArrayList<>(classNames.length);
        for (String className : classNames) {
            try {
                Class<?> clazz = ClassUtils.forName(className, DispatcherServlet.class.getClassLoader());
                Object strategy = createDefaultStrategy(context, clazz);
                strategies.add((T) strategy);
            }
            catch (ClassNotFoundException ex) {
                throw new BeanInitializationException(
                        "Could not find DispatcherServlet's default strategy class [" + className +
                        "] for interface [" + key + "]", ex);
            }
            catch (LinkageError err) {
                throw new BeanInitializationException(
                        "Unresolvable class definition for DispatcherServlet's default strategy class [" +
                        className + "] for interface [" + key + "]", err);
            }
        }
        return strategies;
    }
    else {
        return new LinkedList<>();
    }
}
  • defaultStrategies是Properties類型的靜態變量,保存了策略名到默認工廠實現類的映射關系,它被DispatcherServlet的靜態代碼塊所填充。默認的策略定義在spring-webmvc包下的DispatcherServlet.properties文件中,該文件內容如下:
    # Default implementation classes for DispatcherServlet's strategy interfaces.
    # Used as fallback when no matching beans are found in the DispatcherServlet context.
    # Not meant to be customized by application developers.
    
    org.springframework.web.servlet.LocaleResolver=org.springframework.web.servlet.i18n.AcceptHeaderLocaleResolver
    
    org.springframework.web.servlet.ThemeResolver=org.springframework.web.servlet.theme.FixedThemeResolver
    
    org.springframework.web.servlet.HandlerMapping=org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping,\
        org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping
    
    org.springframework.web.servlet.HandlerAdapter=org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter,\
        org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter,\
        org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter
    
    org.springframework.web.servlet.HandlerExceptionResolver=org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver,\
        org.springframework.web.servlet.mvc.annotation.ResponseStatusExceptionResolver,\
        org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver
    
    org.springframework.web.servlet.RequestToViewNameTranslator=org.springframework.web.servlet.view.DefaultRequestToViewNameTranslator
    
    org.springframework.web.servlet.ViewResolver=org.springframework.web.servlet.view.InternalResourceViewResolver
    
    org.springframework.web.servlet.FlashMapManager=org.springframework.web.servlet.support.SessionFlashMapManager
    
  • 以HandlerMapping為例,獲取HandlerMapping默認實現的調用是getDefaultStrategies(context, HandlerMapping.class),接著會查找以HandlerMapping.class.getName()為鍵的值,從文件中可以看到是org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping和org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping兩個工廠實現類;
  • 其他組件的策略同理,在此不再贅述。

總結

至此,本文完成了對DispatcherServlet的init方法的分析,它已準備好提供服務了,對請求處理的分析請看后續文章。

參考文獻

SpringMVC源碼剖析(三)- DispatcherServlet的初始化流程

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。
  • 序言:七十年代末,一起剝皮案震驚了整個濱河市,隨后出現的幾起案子,更是在濱河造成了極大的恐慌,老刑警劉巖,帶你破解...
    沈念sama閱讀 228,443評論 6 532
  • 序言:濱河連續發生了三起死亡事件,死亡現場離奇詭異,居然都是意外死亡,警方通過查閱死者的電腦和手機,發現死者居然都...
    沈念sama閱讀 98,530評論 3 416
  • 文/潘曉璐 我一進店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人,你說我怎么就攤上這事。” “怎么了?”我有些...
    開封第一講書人閱讀 176,407評論 0 375
  • 文/不壞的土叔 我叫張陵,是天一觀的道長。 經常有香客問我,道長,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 62,981評論 1 312
  • 正文 為了忘掉前任,我火速辦了婚禮,結果婚禮上,老公的妹妹穿的比我還像新娘。我一直安慰自己,他們只是感情好,可當我...
    茶點故事閱讀 71,759評論 6 410
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著,像睡著了一般。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發上,一...
    開封第一講書人閱讀 55,204評論 1 324
  • 那天,我揣著相機與錄音,去河邊找鬼。 笑死,一個胖子當著我的面吹牛,可吹牛的內容都是我干的。 我是一名探鬼主播,決...
    沈念sama閱讀 43,263評論 3 441
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了?” 一聲冷哼從身側響起,我...
    開封第一講書人閱讀 42,415評論 0 288
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎,沒想到半個月后,有當地人在樹林里發現了一具尸體,經...
    沈念sama閱讀 48,955評論 1 336
  • 正文 獨居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內容為張勛視角 年9月15日...
    茶點故事閱讀 40,782評論 3 354
  • 正文 我和宋清朗相戀三年,在試婚紗的時候發現自己被綠了。 大學時的朋友給我發了我未婚夫和他白月光在一起吃飯的照片。...
    茶點故事閱讀 42,983評論 1 369
  • 序言:一個原本活蹦亂跳的男人離奇死亡,死狀恐怖,靈堂內的尸體忽然破棺而出,到底是詐尸還是另有隱情,我是刑警寧澤,帶...
    沈念sama閱讀 38,528評論 5 359
  • 正文 年R本政府宣布,位于F島的核電站,受9級特大地震影響,放射性物質發生泄漏。R本人自食惡果不足惜,卻給世界環境...
    茶點故事閱讀 44,222評論 3 347
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧,春花似錦、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 34,650評論 0 26
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至,卻和暖如春,著一層夾襖步出監牢的瞬間,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 35,892評論 1 286
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留,地道東北人。 一個月前我還...
    沈念sama閱讀 51,675評論 3 392
  • 正文 我出身青樓,卻偏偏與公主長得像,于是被迫代替她去往敵國和親。 傳聞我的和親對象是個殘疾皇子,可洞房花燭夜當晚...
    茶點故事閱讀 47,967評論 2 374

推薦閱讀更多精彩內容