seckill項(xiàng)目創(chuàng)建流程---DAO層

一坑夯、基本構(gòu)造

1喂窟、在文件目錄下創(chuàng)建一個(gè)maven項(xiàng)目

mvn archetype:generate -DgroupId=org.seckill -DartifactId=seckill -DarchetypeArtifactId=maven-archetype-webapp -DarchetypeCatalog=local

2、用idea導(dǎo)入這個(gè)maven.xml項(xiàng)目

3椒舵、修改web.xml文件-------將2.3修改為3.0蚂踊,因?yàn)椋甙姹镜腟ervlet支持更多的特性,更方便我們的Coding,特別是支持注解這一特性

這個(gè)修改的內(nèi)容可以到tomcat目錄下去找

C:\軟件\apache-tomcat-8.0.47\webapps\examples\WEB-INF\web.xml
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
                      http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
         version="3.0"
         metadata-complete="true">
    <!--用maven創(chuàng)建的web-app需要修改servlet的版本為3.0-->

4笔宿、創(chuàng)建項(xiàng)目目錄結(jié)構(gòu)

image.png

5犁钟、修改maven.xml文件,導(dǎo)入工程所需的jar包(junit需要最新的)

<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>org.seckill</groupId>
  <artifactId>seckill</artifactId>
  <packaging>war</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>seckill Maven Webapp</name>
  <url>http://maven.apache.org</url>
  <dependencies>
    <!-- https://mvnrepository.com/artifact/junit/junit -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>

    <!-- 補(bǔ)全項(xiàng)目依賴 -->
    <!-- 1泼橘、日志 java日志:slf4j涝动,log4j,logback,common-logging slf4j是規(guī)范/接口 日志實(shí)現(xiàn):log4j,lonback,common-logging
        使用slf4j,logback -->
    <!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.7.25</version>
    </dependency>

    <!-- 整合slf4j接口以及實(shí)現(xiàn) -->
    <!-- https://mvnrepository.com/artifact/ch.qos.logback/logback-classic -->
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>1.1.7</version>
      <scope>test</scope>
    </dependency>

    <!-- https://mvnrepository.com/artifact/ch.qos.logback/logback-core -->
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-core</artifactId>
      <version>1.1.7</version>
    </dependency>


    <!-- 2、數(shù)據(jù)庫(kù)相關(guān) -->
    <!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
    <dependency>
      <groupId>mysql</groupId>
      <artifactId>mysql-connector-java</artifactId>
      <version>6.0.6</version>
      <scope>runtime</scope>
    </dependency>
    <!-- https://mvnrepository.com/artifact/com.mchange/c3p0 -->
    <dependency>
      <groupId>com.mchange</groupId>
      <artifactId>c3p0</artifactId>
      <version>0.9.5.2</version>
    </dependency>

    <!-- 3炬灭、dao層框架依賴 -->
    <!-- https://mvnrepository.com/artifact/org.mybatis/mybatis -->
    <dependency>
      <groupId>org.mybatis</groupId>
      <artifactId>mybatis</artifactId>
      <version>3.4.5</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.mybatis/mybatis-spring -->
    <dependency>
      <groupId>org.mybatis</groupId>
      <artifactId>mybatis-spring</artifactId>
      <version>1.3.1</version>
    </dependency>

    <!-- 3 醋粟、servlet web相關(guān) -->
    <!-- https://mvnrepository.com/artifact/taglibs/standard -->
    <dependency>
      <groupId>taglibs</groupId>
      <artifactId>standard</artifactId>
      <version>1.1.2</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/javax.servlet/jstl -->
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>jstl</artifactId>
      <version>1.2</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>2.9.2</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api -->
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
      <version>3.1.0</version>
      <scope>provided</scope>
    </dependency>


    <!--4、spring 依賴 -->
    <!-- 4.1重归、spring core核心依賴 -->
    <!-- https://mvnrepository.com/artifact/org.springframework/spring-core -->
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-core</artifactId>
      <version>4.3.12.RELEASE</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.springframework/spring-beans -->
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-beans</artifactId>
      <version>4.3.12.RELEASE</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.springframework/spring-context -->
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-context</artifactId>
      <version>4.3.12.RELEASE</version>
    </dependency>

    <!-- 4.2 spring dao層依賴 -->
    <!-- https://mvnrepository.com/artifact/org.springframework/spring-jdbc -->
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-jdbc</artifactId>
      <version>4.3.12.RELEASE</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.springframework/spring-tx -->
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-tx</artifactId>
      <version>4.3.12.RELEASE</version>
    </dependency>

    <!-- 4.3 spring web相關(guān)依賴 -->
    <!-- https://mvnrepository.com/artifact/org.springframework/spring-webmvc -->
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-webmvc</artifactId>
      <version>4.3.12.RELEASE</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.springframework/spring-web -->
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-web</artifactId>
      <version>4.3.12.RELEASE</version>
    </dependency>

    <!-- 4.4 spring test相關(guān)依賴 -->

    <!-- https://mvnrepository.com/artifact/org.springframework/spring-test -->
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-test</artifactId>
      <version>4.3.12.RELEASE</version>
      <scope>test</scope>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.springframework/spring-aop -->
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-aop</artifactId>
      <version>4.3.12.RELEASE</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/redis.clients/jedis -->
    <dependency>
      <groupId>redis.clients</groupId>
      <artifactId>jedis</artifactId>
      <version>2.9.0</version>
    </dependency>

    <dependency>
      <groupId>com.dyuproject.protostuff</groupId>
      <artifactId>protostuff-runtime</artifactId>
      <version>1.1.1</version>
    </dependency>
    <dependency>
      <groupId>com.dyuproject.protostuff</groupId>
      <artifactId>protostuff-core</artifactId>
      <version>1.1.3</version>
    </dependency>

    <!--導(dǎo)入apache工具-->
    <dependency>
      <groupId>commons-collections</groupId>
      <artifactId>commons-collections</artifactId>
      <version>3.2.2</version>
    </dependency>


  </dependencies>
  <build>
    <finalName>seckill</finalName>
      <plugins>
          <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-compiler-plugin</artifactId>
              <configuration>
                  <source>1.8</source>
                  <target>1.8</target>
              </configuration>
          </plugin>
      </plugins>
  </build>
</project>

6米愿、創(chuàng)建實(shí)體包 Seckill SuccessKilled

Seckill (省略Set Get toString)

package com.seckill.entity;
public class Seckill {

    private long seckillId;
    private String name;
    private int number;
    private Date startTime;
    private Date endTime;
    private Date createTime;

}

SuccessKilled

public class SuccessKilled {
    public SuccessKilled() {
        // Auto-generated constructor stub
    }

    private long seckillId;//秒殺商品ID
    private long userPhone;//參與秒殺的用戶手機(jī)號(hào)碼
    private short state;//秒殺的狀態(tài)
    private Date createTime;//秒殺的時(shí)間

    //多對(duì)一
    private Seckill seckill;
}

7、編寫dao層接口 SeckillDao 鼻吮、SuccessKilledDao,相對(duì)應(yīng)與mybatis

seckillDao:商品信息的數(shù)據(jù)操作
~育苟、在執(zhí)行秒殺操作中,前臺(tái)顯示商品列表椎木,所以需要能夠根據(jù)偏移量查詢商品列表的數(shù)據(jù)操作:queryAll(offset,limit);
~违柏、當(dāng)點(diǎn)擊商品詳情時(shí),需要根據(jù)此商品id進(jìn)行操作香椎,需要:queryById(seckilllID);
~漱竖、當(dāng)秒殺成功后,需要對(duì)商品數(shù)據(jù)進(jìn)行操作士鸥,即減少商品數(shù)量闲孤,需要:reduceNumber(seckillId,killTime)(此處的參數(shù)應(yīng)該根據(jù)數(shù)據(jù)庫(kù)表的字段來進(jìn)行操作);
~、在分頁(yè)操作中需要獲取數(shù)據(jù)的總數(shù),需要querySeckillNumber()

public interface SeckillDao {
    
    /**
     * 減庫(kù)存讼积,秒殺成功后庫(kù)存數(shù)量減少肥照?
     * @param seckillId
     * @param killTime
     * @return 如果影響行數(shù)>1,表示更新的記錄行數(shù)
     */
    int reduceNumber(@Param("seckillId")long seckillId, @Param("killTime")Date killTime);

    /**
     * 根據(jù)id查詢
     * @param seckillId
     * @return
     */
    Seckill queryById(long seckillId);

    /**
     * 根據(jù)偏移量查詢秒殺商品列表
     * @param offset
     * @param limit
     * @return
     */
    List<Seckill> queryAll(@Param("offset")int offset, @Param("limit")int limit);

    /**
     * 獲取商品的種類數(shù)量
     * @return 秒殺商品的種類
     */
    int querySeckillNumber();

    /**
     * 使用存儲(chǔ)過程執(zhí)行秒殺
     * @param paramMap
     */
    void killByProcedure(Map<String, Object> paramMap);

}

SuccessKilledDao:秒殺信息表的數(shù)據(jù)操作
~勤众、秒殺后需要秒殺用戶的一系列信息舆绎,因此需要:insertSuccessKilled(seckillId,userPhone)
~、當(dāng)用戶秒殺成功前需要進(jìn)行一系列判斷(是否已經(jīng)秒殺過)们颜,因此需要根據(jù)用戶手機(jī)和商品id進(jìn)行查詢:queryByIdWithSeckill(seckillId,userPhone)

public interface SuccessKilledDao {

    /**
     * 插入一條詳細(xì)的購(gòu)買信息
     * @param seckillId
     * @param userPhone
     * @return 成功插入返回1吕朵,否則返回0
     */
    int insertSuccessKilled(@Param("seckillId")long seckillId, @Param("userPhone")long userPhone);

    /**
     * 根據(jù)秒殺商品的id查詢,明細(xì)信息
     * @param seckillId
     * @param uerPhone
     * @return 秒殺商品的明細(xì)信息
     */
    SuccessKilled queryByIdWithSeckill(@Param("seckillId")long seckillId, @Param("userPhone")long uerPhone);
}

8窥突、Mybatis的mapper映射配置文件-----SeckillDao.xml和SuccessKilledDao.xml

SeckillDao.xml

<?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.seckill.dao.SeckillDao">
    <!--這里的<=需要使用進(jìn)行忽略,所以是要進(jìn)行忽略,使用CDATA 區(qū)段中的文本會(huì)被解析器忽略 -->
    <update id="reduceNumber">
        UPDATE seckill
        SET number = number - 1
        WHERE seckill_id = #{seckillId}
        AND start_time
        <![CDATA[
              <=
              ]]>
        #{killTime}
        AND end_time >= #{killTime}
        AND number > 0
    </update>

    <select id="queryById" resultType="com.seckill.entity.Seckill" parameterType="long">
        SELECT * FROM
        seckill AS s
        WHERE s.seckill_id = #{seckillId}
    </select>

    <select id="queryAll" resultType="com.seckill.entity.Seckill">
        SELECT * FROM seckill as s
        ORDER BY create_time
        LIMIT #{offset}, #{limit}
    </select>

    <select id="querySeckillNumber" resultType="int">
        SELECT count(*) FROM seckill
    </select>
    <!--調(diào)用存儲(chǔ)過程-->
    <select id="killByProcedure" statementType="CALLABLE">
        CALL execute_seckill(
              #{seckillId,jdbcType=BIGINT,mode=IN},
              #{phone,jdbcType=BIGINT,mode=IN},
              #{killTime,jdbcType=TIMESTAMP,mode=IN},
              #{result,jdbcType=INTEGER,mode=OUT}
        )
    </select>
</mapper>

SuccessKilledDao

<?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.seckill.dao.SuccessKilledDao">

    <!-- ignore 處理主鍵沖突時(shí)候 -->
    <insert id="insertSuccessKilled">
        INSERT IGNORE INTO success_killed (seckill_id,user_phone,state)
        VALUES (#{seckillId}, #{userPhone},0)

    </insert>

    <select id="queryByIdWithSeckill" resultType="com.seckill.entity.SuccessKilled">
        <!-- 根據(jù)ID查詢seccessKilled并攜帶seckill實(shí)體 -->
        <!-- 如果告訴mybatis把結(jié)果映射到successKilled同時(shí)映射seckill屬性  -->
        <!-- 開啟了駝峰命名法轉(zhuǎn)換努溃,以及別名替換列名 -->
        <!-- 可以自由控制sql -->
        SELECT
        sk.seckill_id,
        sk.user_phone,
        sk.create_time,
        sk.state,
        s.seckill_id  "seckill.seckill_id",
        s.name "seckill.name",
        s.number "seckill",
        s.start_time  "seckill.start_time",
        s.end_time  "seckill.end_time",
        s.create_time "seckill.create_time"
        FROM success_killed sk
        INNER JOIN seckill s ON sk.seckill_id = s.seckill_id
        WHERE sk.seckill_id = #{seckillId}
        AND sk.user_phone= #{userPhone}
    </select>
</mapper>

建立mybatis的mybatis-config.xml配置文件

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration
        PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
    <settings>
        <!--使用jdbc的getGenerateKeys 獲取數(shù)據(jù)庫(kù)自增主鍵值  -->
        <setting name="useGeneratedKeys" value="true"/>
        <!-- 使用別名替換列名 ,默認(rèn)true -->
        <setting name="useColumnLabel" value="true"/>
        <!--使用駝峰命名轉(zhuǎn)換 :Table(create_Time) -> Table(createTime)  -->
        <setting name="mapUnderscoreToCamelCase" value="true"/>
    </settings>
</configuration>

整合spring和Mybatis阻问,建立spring的dao層配置文件梧税,在resources下創(chuàng)建seckill-dao.xml
~、操作數(shù)據(jù)称近,因此需要數(shù)據(jù)庫(kù)相關(guān)參數(shù)
~第队、配置數(shù)據(jù)庫(kù)連接池
~、配置sqlSessionFactory,進(jìn)行mybatis和spring的整合
~刨秆、配置dao接口類凳谦,動(dòng)態(tài)實(shí)現(xiàn)mapper接口,注入到spring容器中

<?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"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/context
        http://www.springframework.org/schema/context/spring-context-4.3.xsd">

    <!-- 配置整合mybatis過程 -->
    <!-- 1衡未、配置數(shù)據(jù)庫(kù)相關(guān)參數(shù) -->
    <context:property-placeholder location="classpath:jdbc.properties" />

    <!-- 2尸执、配置數(shù)據(jù)庫(kù)連接池 -->
    <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
        <property name="driverClass" value="${jdbc.driver}"></property>
        <property name="jdbcUrl" value="${jdbc.url}"></property>
        <property name="user" value="${jdbc.user}"></property>
        <property name="password" value="${jdbc.password}"></property>
        <!--c3p0私有屬性-->
        <property name="maxPoolSize" value="50"/>
        <property name="minPoolSize" value="10"/>
        <!--關(guān)閉連接后不自動(dòng)commit-->
        <property name="autoCommitOnClose" value="false"/>
        <!--獲取連接超時(shí)時(shí)間-->
        <!-- <property name="checkoutTimeout" value="1000"/> -->
        <!--當(dāng)獲取連接失敗時(shí)的重試次數(shù)-->

    </bean>
    <!--3、配置sqlSessionFactory ,進(jìn)行mybatis和spring的整合 -->
    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
        <!-- 注入數(shù)據(jù)庫(kù)連接池 -->
        <property name="dataSource" ref="dataSource"></property>
        <!-- 配置mybatis全局配置文件 /imoocDemo1/src/main/resources/mybatis-config.xml -->
        <property name="configLocation" value="classpath:mybatis-config.xml" />
        <!-- 配置entity包眠屎,也就是實(shí)體類包剔交,自動(dòng)掃描,用于別名配置 -->
        <property name="typeAliasesPackage" value="com.seckill.entity"></property>
        <!-- 配置需要掃描的mapper.xml文件 -->
        <property name="mapperLocations" value="classpath:mapper/*.xml"></property>
    </bean>

    <!-- 4改衩、配置掃描dao接口包岖常,動(dòng)態(tài)實(shí)現(xiàn)mapper接口,注入到spring容器中 -->
    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
        <!--注入sqlSessionFactory,請(qǐng)注意不要使用sqlSessionFactoryBean,否則會(huì)出現(xiàn)注入異常 -->
        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory" />
        <!--給出要掃描的mapper接口 -->
        <property name="basePackage" value="com.seckill.dao" />
    </bean>

    <!--注入redis-dao-->
    <bean id ="JedisDao" class="com.seckill.dao.cache.RedisDao">
        <constructor-arg index="0" value="localhost"/>
        <constructor-arg index="1" value="6379"/>
    </bean>
</beans>

另外葫督,建立jdbc.properties配置文件竭鞍,用于數(shù)據(jù)庫(kù)信息的讀取

jdbc.driver=com.mysql.jdbc.Driver
jdbc.user=root
jdbc.password=password
jdbc.url=jdbc\:mysql\://localhost\:3306/seckill?useUnicode\=true&characterEncoding\=UTF-8&serverTimezone\=UTC&useSSL\=false

9、單元測(cè)試

對(duì)SeckillDao以及SuccessKilledDao接口橄镜,數(shù)據(jù)的操作進(jìn)行測(cè)試
在test.java下建立com.seckill.dao包,IDEA里面有一個(gè)快速建立測(cè)試的快捷鍵Ctrl+Shift+T
SeckillDaoTest

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:spring/spring-dao.xml")
public class SeckillDaoTest {

    //注入需要測(cè)試的類的實(shí)例
    @Resource
    private SeckillDao seckillDao;

    @Test
    public void querySeckillNumber() throws Exception {

        System.out.println(seckillDao.querySeckillNumber());
    }
    @Test
    public void reduceNumber() throws Exception {
        long seckillId = 1000;
        Date killTime = new Date();
        int i = seckillDao.reduceNumber(seckillId, killTime);
        System.out.println(i);
    }

    @Test
    public void queryById() throws Exception {
        long seckillId = 1000;
        Seckill seckill = seckillDao.queryById(seckillId);
        System.out.println(seckill.toString());
    }

    @Test
    public void queryAll() throws Exception {
        int offset = 2;
        int limit = 3;
        List<Seckill> list = seckillDao.queryAll(offset, limit);
        Iterator iterator  = list.iterator();
        while(iterator.hasNext()) System.out.println(iterator.next());
    }

}

SuccessKilledDaoTest:

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:spring/spring-dao.xml")
public class SuccessKilledDaoTest {

    private Logger logger = LoggerFactory.getLogger(this.getClass());

    @Resource
    private SuccessKilledDao successKilledDao;

    @Test
    public void insertSuccessKilled() throws Exception {

        long seckillId = 1009L;
        long userPhone = 18126745521L;

        int result = successKilledDao.insertSuccessKilled(seckillId, userPhone);
        logger.info(Integer.toString(result));
    }

    @Test
    public void queryByIdWithSeckill() throws Exception {

        long seckillId = 1001L;
        long userPhone = 18126745520L;

        SuccessKilled successKilled = successKilledDao.queryByIdWithSeckill(seckillId, userPhone);
        logger.info(successKilled.toString());

    }

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末偎快,一起剝皮案震驚了整個(gè)濱河市,隨后出現(xiàn)的幾起案子洽胶,更是在濱河造成了極大的恐慌晒夹,老刑警劉巖,帶你破解...
    沈念sama閱讀 221,576評(píng)論 6 515
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場(chǎng)離奇詭異丐怯,居然都是意外死亡喷好,警方通過查閱死者的電腦和手機(jī),發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 94,515評(píng)論 3 399
  • 文/潘曉璐 我一進(jìn)店門读跷,熙熙樓的掌柜王于貴愁眉苦臉地迎上來梗搅,“玉大人,你說我怎么就攤上這事效览∥耷校” “怎么了?”我有些...
    開封第一講書人閱讀 168,017評(píng)論 0 360
  • 文/不壞的土叔 我叫張陵丐枉,是天一觀的道長(zhǎng)哆键。 經(jīng)常有香客問我,道長(zhǎng)瘦锹,這世上最難降的妖魔是什么洼哎? 我笑而不...
    開封第一講書人閱讀 59,626評(píng)論 1 296
  • 正文 為了忘掉前任,我火速辦了婚禮沼本,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘锭沟。我一直安慰自己抽兆,他們只是感情好,可當(dāng)我...
    茶點(diǎn)故事閱讀 68,625評(píng)論 6 397
  • 文/花漫 我一把揭開白布族淮。 她就那樣靜靜地躺著辫红,像睡著了一般。 火紅的嫁衣襯著肌膚如雪祝辣。 梳的紋絲不亂的頭發(fā)上贴妻,一...
    開封第一講書人閱讀 52,255評(píng)論 1 308
  • 那天,我揣著相機(jī)與錄音蝙斜,去河邊找鬼名惩。 笑死,一個(gè)胖子當(dāng)著我的面吹牛孕荠,可吹牛的內(nèi)容都是我干的娩鹉。 我是一名探鬼主播,決...
    沈念sama閱讀 40,825評(píng)論 3 421
  • 文/蒼蘭香墨 我猛地睜開眼稚伍,長(zhǎng)吁一口氣:“原來是場(chǎng)噩夢(mèng)啊……” “哼弯予!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起个曙,我...
    開封第一講書人閱讀 39,729評(píng)論 0 276
  • 序言:老撾萬(wàn)榮一對(duì)情侶失蹤锈嫩,失蹤者是張志新(化名)和其女友劉穎,沒想到半個(gè)月后,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體呼寸,經(jīng)...
    沈念sama閱讀 46,271評(píng)論 1 320
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡艳汽,尸身上長(zhǎng)有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 38,363評(píng)論 3 340
  • 正文 我和宋清朗相戀三年,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了等舔。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片骚灸。...
    茶點(diǎn)故事閱讀 40,498評(píng)論 1 352
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡,死狀恐怖慌植,靈堂內(nèi)的尸體忽然破棺而出甚牲,到底是詐尸還是另有隱情,我是刑警寧澤蝶柿,帶...
    沈念sama閱讀 36,183評(píng)論 5 350
  • 正文 年R本政府宣布丈钙,位于F島的核電站,受9級(jí)特大地震影響交汤,放射性物質(zhì)發(fā)生泄漏雏赦。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,867評(píng)論 3 333
  • 文/蒙蒙 一芙扎、第九天 我趴在偏房一處隱蔽的房頂上張望星岗。 院中可真熱鬧,春花似錦戒洼、人聲如沸俏橘。這莊子的主人今日做“春日...
    開封第一講書人閱讀 32,338評(píng)論 0 24
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽(yáng)寥掐。三九已至,卻和暖如春磷蜀,著一層夾襖步出監(jiān)牢的瞬間召耘,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 33,458評(píng)論 1 272
  • 我被黑心中介騙來泰國(guó)打工褐隆, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留污它,地道東北人。 一個(gè)月前我還...
    沈念sama閱讀 48,906評(píng)論 3 376
  • 正文 我出身青樓妓灌,卻偏偏與公主長(zhǎng)得像轨蛤,于是被迫代替她去往敵國(guó)和親。 傳聞我的和親對(duì)象是個(gè)殘疾皇子虫埂,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 45,507評(píng)論 2 359

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

  • Spring Cloud為開發(fā)人員提供了快速構(gòu)建分布式系統(tǒng)中一些常見模式的工具(例如配置管理祥山,服務(wù)發(fā)現(xiàn),斷路器掉伏,智...
    卡卡羅2017閱讀 134,699評(píng)論 18 139
  • 前言 本篇將完成DAO層的設(shè)計(jì)與開發(fā)缝呕,包括: 數(shù)據(jù)庫(kù)澳窑、DAO實(shí)體與接口設(shè)計(jì)與編碼 基于MyBatis實(shí)現(xiàn)DAO編程...
    MOVE1925閱讀 1,356評(píng)論 0 4
  • 一步一步的搭建JAVA WEB項(xiàng)目,采用Maven構(gòu)建供常,基于MYBatis+Spring+Spring MVC+B...
    葉子的翅膀閱讀 12,673評(píng)論 5 25
  • 之前寫了一個(gè)用SSM框架搭建的商品查詢系統(tǒng),分兩篇文章分別記錄了自己整合SSM框架的過程以及利用SSM開發(fā)的一些基...
    codingXiaxw閱讀 5,156評(píng)論 7 29
  • 09屆摊聋。17屆。好遙遠(yuǎn)栈暇。好想念麻裁。 我今晚,好想夢(mèng)到那幾年源祈。
    lost_star閱讀 174評(píng)論 0 0