idea 2017 SpringMVC-Spring-MyBatis Maven項(xiàng)目從零構(gòu)建

前言:

本文為小白爬坑指南,主要作用是防止自己失憶 (逃

零:創(chuàng)建Web工程

1.File -> new project -> maven 選擇 mavne-webapp 模板 idea會生成一個(gè)基礎(chǔ)的web工程目錄結(jié)構(gòu)
2.在pom文件中增加相應(yīng)的依賴包

壹:集成SpringMVC

在web.xml 中引入 SpringMVC

<!--Spring MVC 配置-->
<servlet>
  <servlet-name>springMVC</servlet-name>
  <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
  <init-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>
      classpath:applicationContext-mvc.xml
    </param-value>
  </init-param>
  <load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
  <servlet-name>springMVC</servlet-name>
  <url-pattern>/</url-pattern>
</servlet-mapping>

SpringMVC 配置如下:
1.開啟掃描,指定掃描目錄
指定目錄到Controller包的目的是預(yù)防SpringMVC和Spring掃描沖突
2.開啟靜態(tài)資源訪問

  <!-- 掃描所有的controller 但是不掃描service-->
  <context:component-scan base-package="com.coang.controller"/>

  <!-- <mvc:resources mapping="/pages/**" location="/WEB-INF/pages/" />-->
  <mvc:default-servlet-handler />

  <!-- 自動(dòng)掃描該包,使SpringMVC認(rèn)為包下用了@controller注解的類是控制器 -->
  <mvc:annotation-driven />

  <!-- configure the InternalResourceViewResolver -->
  <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"
        id="internalResourceViewResolver">
      <!-- 前綴 -->
      <property name="prefix" value="/WEB-INF/jsp/" />
      <!-- 后綴 -->
      <property name="suffix" value=".jsp" />
  </bean>  

3.配置好之后創(chuàng)建Controller以及jsp文件

@Controller
public class TestController {

    @RequestMapping("index")
    public String index(){
        return "index";
    }
}

4.配置好tomcat運(yùn)行環(huán)境
5.啟動(dòng)工程
6.SpringMVC集成完畢

貳:集成Spring MyBatis

1.Dao匹配/Bean封裝
2.注解事務(wù)處理

applicationContext-database.xml 數(shù)據(jù)源配置/mapping文件和dao映射

    <!-- 引入配置文件 -->
    <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="location">
            <value>classpath:/config/jdbc-mysql.properties</value>
        </property>
    </bean>

    <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
        <property name="driverClassName" value="${jdbc.driver}"/>
        <property name="url" value="${jdbc.url}"/>
        <property name="username" value="${jdbc.username}"/>
        <property name="password" value="${jdbc.password}"/>
        <property name="initialSize" value="${initialSize}"/>
        <property name="maxActive" value="${maxActive}"/>
        <property name="maxIdle" value="${maxildle}"/>
        <property name="minIdle" value="${minldle}"/>
        <property name="maxWait" value="${maxWait}"/>
    </bean>
    <!--spring和MyBatis整合 自動(dòng)掃描mapping.xml文件-->
    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
        <property name="dataSource" ref="dataSource"/>
        <property name="mapperLocations" value="classpath:mapper/*.xml"/>
    </bean>
    <!--Dao接口所在包名 Spring自動(dòng)查找類-->
    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
        <property name="basePackage" value="com.coang.dao"/>
        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
    </bean>

applicationContext-service.xml 事務(wù)管理

  <!-- 掃描所有的Service -->
  <context:component-scan base-package="com.coang"/>
  <!-- 事務(wù)管理 -->
  <bean id="transactionManager"
      class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
    <property name="dataSource" ref="dataSource"/>
  </bean>
  <!--
        基于注解的聲明時(shí)事物 :
        1、開發(fā)團(tuán)隊(duì)達(dá)成一致約定,明確標(biāo)注事物的方法
        2、保證事物方法的執(zhí)行時(shí)間盡可能短
        3、不是所有的方法都需要事物,如只有一條修改記錄操作
    -->
  <tx:annotation-driven transaction-manager="transactionManager"/>
坑1 -- 如果SpringMVC的掃描路徑包含Service掃描路徑,由于加載順序,Service會在SpringMVC加載時(shí)在Spring中生成無事務(wù)的bean 在事務(wù)掃描時(shí)由于bean已存在則不再重新創(chuàng)建,導(dǎo)致事務(wù)不生效
坑2 -- idea中的Spring框架context配置應(yīng)如下,否則框架無法正常加載
image.png
TestDEMO:

單元測試

    @RunWith(SpringJUnit4ClassRunner.class)
    @ContextConfiguration(locations = {"classpath*:application-service.xml"})
    public class TestUser {
    
        @Autowired
        UserService userService;
    
        @Test
        @Ignore
        public void testAddUser() {
            UserModel user = new UserModel();
            user.setName("aaa");
            user.setPassword("bbb");
            Integer id = userService.addUser(user);
            Assert.assertNotNull(id);
    
        }
    
    }

Dao mapper文件

<?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
    <mapper namespace="com.coang.dao.UserDao" >
        <select id="findUserById" resultType="com.coang.modal.UserModel" parameterType="java.lang.Integer">
            select * from user where id = #{id}
        </select>
        <insert id="insertUser" parameterType="com.coang.modal.UserModel">
            insert into user(name,password) values(#{name},#{password})
            <selectKey resultType="int" keyProperty="id" >
                SELECT LAST_INSERT_ID();
            </selectKey>
        </insert>
    </mapper>
注:成功整合 mapper文件相當(dāng)于Dao層接口的實(shí)現(xiàn)類 在Service層調(diào)用時(shí)可進(jìn)行注解注入

附錄:附配置文件

1.maven: pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.coang</groupId>
<artifactId>java</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>ssm Maven Webapp</name>
<url>http://maven.apache.org</url>
<properties>
  <java-version>1.8</java-version>
  <!-- spring版本號 -->
  <spring.version>4.3.10.RELEASE</spring.version>
  <!-- mybatis版本號 -->
  <mybatis.version>3.3.0</mybatis.version>
  <!-- log4j日志文件管理包版本 -->
  <slf4j.version>1.7.7</slf4j.version>
  <log4j.version>1.2.17</log4j.version>
</properties>

<dependencies>
  <!-- Spring -->
  <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-context</artifactId>
    <version>${spring.version}</version>
  </dependency>
  <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-context-support</artifactId>
    <version>${spring.version}</version>
  </dependency>
  <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-beans</artifactId>
    <version>${spring.version}</version>
  </dependency>
  <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-aop</artifactId>
    <version>${spring.version}</version>
  </dependency>

  <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-jdbc</artifactId>
    <version>${spring.version}</version>
  </dependency>

  <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-webmvc</artifactId>
    <version>${spring.version}</version>
  </dependency>
  <!-- springframe end -->
  <!-- mybatis/spring包 -->
  <dependency>
    <groupId>org.mybatis</groupId>
    <artifactId>mybatis-spring</artifactId>
    <version>1.2.3</version>
  </dependency>
  <!-- mybatis核心包 -->
  <dependency>
    <groupId>org.mybatis</groupId>
    <artifactId>mybatis</artifactId>
    <version>${mybatis.version}</version>
  </dependency>
  <!-- mysql驅(qū)動(dòng)包 -->
  <dependency>
    <groupId>mysql</groupId>
    <artifactId>mysql-connector-java</artifactId>
    <version>5.1.29</version>
  </dependency>
  <!--數(shù)據(jù)庫連接池-->
  <dependency>
    <groupId>commons-dbcp</groupId>
    <artifactId>commons-dbcp</artifactId>
    <version>1.4</version>
  </dependency>
  <!-- https://mvnrepository.com/artifact/com.microsoft.sqlserver/mssql-jdbc -->
  <dependency>
    <groupId>com.microsoft.sqlserver</groupId>
    <artifactId>mssql-jdbc</artifactId>
    <version>6.1.0.jre8</version>
    <scope>test</scope>
  </dependency>
  <!-- https://mvnrepository.com/artifact/javax.servlet/servlet-api -->
  <dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>servlet-api</artifactId>
    <version>2.5</version>
    <scope>provided</scope>
  </dependency>
  <!-- 引入oracle數(shù)據(jù)庫jdbc驅(qū)動(dòng)包 -->
  <!--<dependency>
      <groupId>com.oracle</groupId>
      <artifactId>ojdbc6</artifactId>
      <version></version>
  </dependency>-->
  <!--jedis 驅(qū)動(dòng)-->
  <dependency>
    <groupId>redis.clients</groupId>
    <artifactId>jedis</artifactId>
    <version>2.9.0</version>
    <type>jar</type>
    <scope>compile</scope>
  </dependency>

  <!--spring data redis-->
  <dependency>
    <groupId>org.springframework.data</groupId>
    <artifactId>spring-data-redis</artifactId>
    <version>1.8.6.RELEASE</version>
  </dependency>


  <!-- Test -->
  <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-test</artifactId>
    <version>${spring.version}</version>
    <scope>test</scope>
  </dependency>
  <dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <version>4.12</version>
    <scope>test</scope>
  </dependency>
  <!-- json數(shù)據(jù) -->
  <dependency>
    <groupId>org.codehaus.jackson</groupId>
    <artifactId>jackson-mapper-asl</artifactId>
    <version>1.9.13</version>
  </dependency>
  <!-- https://mvnrepository.com/artifact/com.alibaba/fastjson -->
  <dependency>
    <groupId>com.alibaba</groupId>
    <artifactId>fastjson</artifactId>
    <version>1.2.35</version>
  </dependency>
  <!-- JSTL -->
  <dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>jstl</artifactId>
    <version>1.2</version>
  </dependency>
  <!-- 日志文件管理包 -->
  <!-- log start -->
  <dependency>
    <groupId>log4j</groupId>
    <artifactId>log4j</artifactId>
    <version>${log4j.version}</version>
  </dependency>
  <dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-api</artifactId>
    <version>${slf4j.version}</version>
  </dependency>
  <dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-log4j12</artifactId>
    <version>${slf4j.version}</version>
  </dependency>
  <!-- log end -->


</dependencies>

<build>
  <finalName>WebFramwork-ssm</finalName>
</build>
</project>
2.web: web.xml
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" >
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
        version="3.1">
<display-name>WebFramwork-ssm</display-name>

<context-param>
  <param-name>contextConfigLocation</param-name>
  <param-value>
    classpath:applicationContext-database.xml,
    classpath:applicationContext-service.xml
  </param-value>
</context-param>

<context-param>
  <param-name>log4jConfigLocation</param-name>
  <param-value>classpath:config/log4j.properties</param-value>
</context-param>

<filter>
  <filter-name>encodingFilter</filter-name>
  <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
  <init-param>
    <param-name>encoding</param-name>
    <param-value>UTF-8</param-value>
  </init-param>
  <init-param>
    <param-name>forceEncoding</param-name>
    <param-value>true</param-value>
  </init-param>
</filter>
<filter-mapping>
  <filter-name>encodingFilter</filter-name>
  <url-pattern>/*</url-pattern>
</filter-mapping>

<!--Spring 監(jiān)聽器-->
<listener>
  <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

<!--防止Spring內(nèi)存溢出監(jiān)聽器-->
<listener>
  <listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>
</listener>
<!--Spring MVC 配置-->
<servlet>
  <servlet-name>springMVC</servlet-name>
  <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
  <init-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>
      classpath:applicationContext-mvc.xml
    </param-value>
  </init-param>
  <load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
  <servlet-name>springMVC</servlet-name>
  <url-pattern>/</url-pattern>
</servlet-mapping>

<welcome-file-list>
  <welcome-file>/jsp/index.jsp</welcome-file>
</welcome-file-list>

<!-- session配置 -->
<session-config>
  <session-timeout>15</session-timeout>
</session-config>
</web-app>
3.Spring mvc:applicationContext-mvc.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:mvc="http://www.springframework.org/schema/mvc"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
       http://www.springframework.org/schema/mvc
       http://www.springframework.org/schema/mvc/spring-mvc.xsd
       http://www.springframework.org/schema/context
       http://www.springframework.org/schema/context/spring-context.xsd">

  <!-- 掃描所有的controller 但是不掃描service-->
  <context:component-scan base-package="com.coang.controller"/>

  <!-- <mvc:resources mapping="/pages/**" location="/WEB-INF/pages/" />-->
  <mvc:default-servlet-handler />

  <!-- 自動(dòng)掃描該包,使SpringMVC認(rèn)為包下用了@controller注解的類是控制器 -->
  <mvc:annotation-driven />

  <!-- configure the InternalResourceViewResolver -->
  <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"
        id="internalResourceViewResolver">
      <!-- 前綴 -->
      <property name="prefix" value="/WEB-INF/jsp/" />
      <!-- 后綴 -->
      <property name="suffix" value=".jsp" />
  </bean>
</beans>
4.Spring:applicationContext-service.xml/applicationContext-database.xml

applicationContext-service.xml - 事務(wù)管理 注解事務(wù)

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc"
  xmlns:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.springframework.org/schema/aop"
  xmlns:context="http://www.springframework.org/schema/context"
  xmlns:util="http://www.springframework.org/schema/util" xmlns:p="http://www.springframework.org/schema/p"
  xmlns:cache="http://www.springframework.org/schema/cache" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
  xsi:schemaLocation="http://www.springframework.org/schema/beans 
            http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
            http://www.springframework.org/schema/mvc
            http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd
            http://www.springframework.org/schema/tx
            http://www.springframework.org/schema/tx/spring-tx-3.2.xsd
            http://www.springframework.org/schema/context
            http://www.springframework.org/schema/context/spring-context-3.2.xsd
            http://www.springframework.org/schema/util 
            http://www.springframework.org/schema/util/spring-util-3.2.xsd
            http://www.springframework.org/schema/cache 
            http://www.springframework.org/schema/cache/spring-cache.xsd
            http://www.springframework.org/schema/task 
            http://www.springframework.org/schema/task/spring-task-3.2.xsd
            http://www.springframework.org/schema/jdbc
            http://www.springframework.org/schema/jdbc/spring-jdbc-3.2.xsd"
  default-lazy-init="true">


  <!-- 掃描所有的Service -->
  <context:component-scan base-package="com.coang"/>

  <!-- 事務(wù)管理 -->
  <bean id="transactionManager"
      class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
    <property name="dataSource" ref="dataSource"/>
  </bean>

  <!--
        基于注解的聲明時(shí)事物 :
        1、開發(fā)團(tuán)隊(duì)達(dá)成一致約定,明確標(biāo)注事物的方法
        2、保證事物方法的執(zhí)行時(shí)間盡可能短
        3、不是所有的方法都需要事物,如只有一條修改記錄操作
    -->
  <tx:annotation-driven transaction-manager="transactionManager"/>
</beans>

applicationContext-database.xml - 管理數(shù)據(jù)庫連接/dao層映射

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:p="http://www.springframework.org/schema/p"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:aop="http://www.springframework.org/schema/aop"
       xmlns:tx="http://www.springframework.org/schema/tx"
       xmlns:util="http://www.springframework.org/schema/util"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans.xsd">

    <!--<context:component-scan base-package="com.coang.web"/>-->

    <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="location">
            <!--<value>classpath:../../config/jdbc-mysql.properties</value>-->
            <value>classpath:/config/jdbc-mysql.properties</value>
        </property>
    </bean>

    <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
        <property name="driverClassName" value="${jdbc.driver}"/>
        <property name="url" value="${jdbc.url}"/>
        <property name="username" value="${jdbc.username}"/>
        <property name="password" value="${jdbc.password}"/>
        <property name="initialSize" value="${initialSize}"/>
        <property name="maxActive" value="${maxActive}"/>
        <property name="maxIdle" value="${maxildle}"/>
        <property name="minIdle" value="${minldle}"/>
        <property name="maxWait" value="${maxWait}"/>
    </bean>
    <!--spring和MyBatis整合 自動(dòng)掃描mapping.xml文件-->
    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
        <property name="dataSource" ref="dataSource"/>
        <property name="mapperLocations" value="classpath:mapper/*.xml"/>
    </bean>
    <!--Dao接口所在包名 Spring自動(dòng)查找類-->
    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
        <property name="basePackage" value="com.coang.dao"/>
        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
    </bean>

</beans>

ps_0 Spring配置文件是可以用單個(gè)xml配置,只是個(gè)人喜好將配置分開 方便理解
ps_1 目錄結(jié)構(gòu)

    WebFramwork-ssm/
    │  pom.xml
    │  tree.txt
    │  WebFramwork-ssm.iml
    │      
    └─src
       └─main
          ├─java
          │  └─com
          │      └─coang
          │          ├─common
          │          ├─controller
          │          │      TestController.java
          │          │      
          │          ├─dao
          │          │      UserDao.java
          │          │      
          │          ├─modal
          │          │      UserModel.java
          │          │      
          │          └─service
          │              │  UserService.java
          │              │  
          │              └─impl
          │                      UserServiceImpl.java
          │                      
          ├─resources
          │  │  applicationContext-database.xml
          │  │  applicationContext-mvc.xml
          │  │  applicationContext-service.xml
          │  │  
          │  ├─config
          │  │      jdbc-mysql.properties
          │  │      jdbc-sqlserver.properties
          │  │      log4j.properties
          │  │      
          │  └─mapper
          │          UserMapper.xml
          │          
          └─webapp
              │  index.jsp
              │  
              └─WEB-INF
                  │  web.xml
                  │  
                  └─jsp
                          index.jsp
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。
  • 序言:七十年代末,一起剝皮案震驚了整個(gè)濱河市,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌,老刑警劉巖,帶你破解...
    沈念sama閱讀 228,238評論 6 531
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場離奇詭異,居然都是意外死亡,警方通過查閱死者的電腦和手機(jī),發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 98,430評論 3 415
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人,你說我怎么就攤上這事。” “怎么了?”我有些...
    開封第一講書人閱讀 176,134評論 0 373
  • 文/不壞的土叔 我叫張陵,是天一觀的道長。 經(jīng)常有香客問我,道長,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 62,893評論 1 309
  • 正文 為了忘掉前任,我火速辦了婚禮,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘。我一直安慰自己,他們只是感情好,可當(dāng)我...
    茶點(diǎn)故事閱讀 71,653評論 6 408
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著,像睡著了一般。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 55,136評論 1 323
  • 那天,我揣著相機(jī)與錄音,去河邊找鬼。 笑死,一個(gè)胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播,決...
    沈念sama閱讀 43,212評論 3 441
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起,我...
    開封第一講書人閱讀 42,372評論 0 288
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎,沒想到半個(gè)月后,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 48,888評論 1 334
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 40,738評論 3 354
  • 正文 我和宋清朗相戀三年,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點(diǎn)故事閱讀 42,939評論 1 369
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情,我是刑警寧澤,帶...
    沈念sama閱讀 38,482評論 5 359
  • 正文 年R本政府宣布,位于F島的核電站,受9級特大地震影響,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 44,179評論 3 347
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧,春花似錦、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 34,588評論 0 26
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 35,829評論 1 283
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留,地道東北人。 一個(gè)月前我還...
    沈念sama閱讀 51,610評論 3 391
  • 正文 我出身青樓,卻偏偏與公主長得像,于是被迫代替她去往敵國和親。 傳聞我的和親對象是個(gè)殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 47,916評論 2 372

推薦閱讀更多精彩內(nèi)容

  • Spring Cloud為開發(fā)人員提供了快速構(gòu)建分布式系統(tǒng)中一些常見模式的工具(例如配置管理,服務(wù)發(fā)現(xiàn),斷路器,智...
    卡卡羅2017閱讀 134,781評論 18 139
  • Spring Boot 參考指南 介紹 轉(zhuǎn)載自:https://www.gitbook.com/book/qbgb...
    毛宇鵬閱讀 46,891評論 6 342
  • 來源:關(guān)于Spring IOC (DI-依賴注入)你需要知道的一切作者:zejian Dao層(AccountDa...
    楊井閱讀 5,349評論 0 27
  • spring官方文檔:http://docs.spring.io/spring/docs/current/spri...
    牛馬風(fēng)情閱讀 1,699評論 0 3
  • 聽說她,源于她的那首名叫《穿越大半個(gè)中國去睡你》的詩,就是這首只讀名字便已讓人羞臊的詩作在兩年前,突襲網(wǎng)絡(luò),一時(shí)之...
    cc蝸牛cc閱讀 810評論 4 5