【轉(zhuǎn)】 Spring Boot + Eureka 實現(xiàn)微服務(wù)負載均衡

1,什么是Eureka,什么是服務(wù)注冊與發(fā)現(xiàn)

? ? ? Spring Boot作為目前最火爆的web框架。那么它與Eureka又有什么關(guān)聯(lián)呢?

? ? Eureka是Netflix開源的一個RESTful服務(wù),主要用于服務(wù)的注冊發(fā)現(xiàn)。

? ? Eureka由兩個組件組成:Eureka服務(wù)器和Eureka客戶端。Eureka服務(wù)器用作服務(wù)注冊服務(wù)器。

? ? Eureka客戶端是一個java客戶端,用來簡化與服務(wù)器的交互、作為輪詢負載均衡器,并提供服務(wù)的故障切換支持。

? ? Netflix在其生產(chǎn)環(huán)境中使用的是另外的客戶端,它提供基于流量、資源利用率以及出錯狀態(tài)的加權(quán)負載均衡。

2,先創(chuàng)建一個Eureka-Server服務(wù)注冊中心


? ? 這里需要用到spring-cloud的Eureka模塊,他是一個服務(wù)的注冊和發(fā)現(xiàn)模塊

? ? ? 如圖我們先new一個Spring-boot工程引入Eureka Server


Next>>>>Finish完成

我們來看看構(gòu)建好的Eureka-Server的pom.xml代碼

? ? <?xml version="1.0" encoding="UTF-8"?>

? ? <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/xsd/maven-4.0.0.xsd">

? ? ? ? <modelVersion>4.0.0</modelVersion>

? ? ? ? <groupId>com.eureka</groupId>

? ? ? ? <artifactId>server</artifactId>

? ? ? ? <version>0.0.1-SNAPSHOT</version>

? ? ? ? <packaging>jar</packaging>

? ? ? ? <name>server</name>

? ? ? ? <description>Demo project for Spring Boot</description>

? ? ? ? <parent>

? ? ? ? ? ? <groupId>org.springframework.boot</groupId>

? ? ? ? ? ? <artifactId>spring-boot-starter-parent</artifactId>

? ? ? ? ? ? <version>2.0.2.RELEASE</version>

? ? ? ? ? ? <relativePath/> <!-- lookup parent from repository -->

? ? ? ? </parent>

? ? ? ? <properties>

? ? ? ? ? ? <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

? ? ? ? ? ? <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

? ? ? ? ? ? <java.version>1.8</java.version>

? ? ? ? ? ? <spring-cloud.version>Finchley.RC2</spring-cloud.version>

? ? ? ? </properties>

? ? ? ? <dependencies>

? ? ? ? ? ? <!-- 引入的Eureka-server -->

? ? ? ? ? ? <dependency>

? ? ? ? ? ? ? ? <groupId>org.springframework.cloud</groupId>

? ? ? ? ? ? ? ? <artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>

? ? ? ? ? ? </dependency>

? ? ? ? ? ? <dependency>

? ? ? ? ? ? ? ? <groupId>org.springframework.boot</groupId>

? ? ? ? ? ? ? ? <artifactId>spring-boot-starter-test</artifactId>

? ? ? ? ? ? ? ? <scope>test</scope>

? ? ? ? ? ? </dependency>

? ? ? ? ? ? <dependency>

? ? ? ? ? ? ? ? <groupId>org.springframework.boot</groupId>

? ? ? ? ? ? ? ? <artifactId>spring-boot-autoconfigure</artifactId>

? ? ? ? ? ? </dependency>

? ? ? ? </dependencies>

? ? ? ? <dependencyManagement>

? ? ? ? ? ? <dependencies>

? ? ? ? ? ? ? ? <dependency>

? ? ? ? ? ? ? ? ? ? <groupId>org.springframework.cloud</groupId>

? ? ? ? ? ? ? ? ? ? <artifactId>spring-cloud-dependencies</artifactId>

? ? ? ? ? ? ? ? ? ? <version>${spring-cloud.version}</version>

? ? ? ? ? ? ? ? ? ? <type>pom</type>

? ? ? ? ? ? ? ? ? ? <scope>import</scope>

? ? ? ? ? ? ? ? </dependency>

? ? ? ? ? ? </dependencies>

? ? ? ? </dependencyManagement>

? ? ? ? <build>

? ? ? ? ? ? <plugins>

? ? ? ? ? ? ? ? <plugin>

? ? ? ? ? ? ? ? ? ? <groupId>org.springframework.boot</groupId>

? ? ? ? ? ? ? ? ? ? <artifactId>spring-boot-maven-plugin</artifactId>

? ? ? ? ? ? ? ? </plugin>

? ? ? ? ? ? </plugins>

? ? ? ? </build>

? ? ? ? <repositories>

? ? ? ? ? ? <repository>

? ? ? ? ? ? ? ? <id>spring-milestones</id>

? ? ? ? ? ? ? ? <name>Spring Milestones</name>

? ? ? ? ? ? ? ? <url>https://repo.spring.io/milestone</url>

? ? ? ? ? ? ? ? <snapshots>

? ? ? ? ? ? ? ? ? ? <enabled>false</enabled>

? ? ? ? ? ? ? ? </snapshots>

? ? ? ? ? ? </repository>

? ? ? ? </repositories>

? ? </project>

? ? 我們看到這里與普通的Spring-boot項目不同的是,這里引用了一個Eureka-Server包。

? ? 那么我們怎么使用它呢,怎么啟動它呢?


? ? 這里只需要啟動一個注解就可以啦,我們在Spring-Boot工程的啟動類上加>>>>>>

? ? @EnableEurekaServer

? ? 代碼如下:


? ? package com.eureka.server;

? ? import org.springframework.boot.SpringApplication;

? ? import org.springframework.boot.autoconfigure.SpringBootApplication;

? ? import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;

? ? /**

? ? * 啟動一個服務(wù)注冊中心

? ? */

? ? @EnableEurekaServer

? ? @SpringBootApplication

? ? public class ServerApplication {


? ? ? ? public static void main(String[] args) {

? ? ? ? ? ? SpringApplication.run(ServerApplication.class, args);

? ? ? ? }

? ? }

差點忘了,我們還需要配置application.yml

Eureka是一個高可用的組件,每一個實例注冊之后需要向注冊中心發(fā)送心跳包,在默認情況下erureka server也是一個eureka client ,必須要指定一個 server。

eureka server的配置文件appication.yml:

? ? server:

? ? ? port: 8081 #服務(wù)注冊中心端口號

? ? eureka:

? ? ? instance:

? ? ? ? hostname: 127.0.0.1 #服務(wù)注冊中心IP地址

? ? ? client:

? ? ? ? registerWithEureka: false #是否向服務(wù)注冊中心注冊自己

? ? ? ? fetchRegistry: false #是否檢索服務(wù)

? ? ? ? serviceUrl: #服務(wù)注冊中心的配置內(nèi)容,指定服務(wù)注冊中心的位置

? ? ? ? ? defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka/

我們來啟動一下吧

我們在瀏覽器上輸入http://127.0.0.1:8081/飛機直達

我們可以看到它的可視化界面

細心的朋友會發(fā)現(xiàn),這里沒有發(fā)現(xiàn)服務(wù)???No instance available

why?? 因為我們還沒有服務(wù)向注冊中心注冊服務(wù),所以找不到啊。

3,先創(chuàng)建一個Eureka-Client客戶端也就是服務(wù)提供者

? ? ? ? 客戶端在向注冊中心它會提供一些元數(shù)據(jù),例如主機和端口,URL,主頁等。Eureka server 從? ? 每? ? ? ? 個client實例接收心跳消息。 如果心跳超時,則通常將該實例從注冊server中刪除。? ? ?

? ? 創(chuàng)建客戶端和服務(wù)端差不多,只是啟動注解有點不一樣,還有yml配置文件


Next>>>Finish完成啦

打開會發(fā)現(xiàn)pom.xml其實和Server注冊中心的類似

? ? <?xml version="1.0" encoding="UTF-8"?>

? ? <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/xsd/maven-4.0.0.xsd">

? ? ? ? <modelVersion>4.0.0</modelVersion>

? ? ? ? <groupId>com.eureka</groupId>

? ? ? ? <artifactId>provider</artifactId>

? ? ? ? <version>0.0.1-SNAPSHOT</version>

? ? ? ? <packaging>jar</packaging>

? ? ? ? <name>provider</name>

? ? ? ? <description>Demo project for Spring Boot</description>

? ? ? ? <parent>

? ? ? ? ? ? <groupId>org.springframework.boot</groupId>

? ? ? ? ? ? <artifactId>spring-boot-starter-parent</artifactId>

? ? ? ? ? ? <version>2.0.2.RELEASE</version>

? ? ? ? ? ? <relativePath/> <!-- lookup parent from repository -->

? ? ? ? </parent>

? ? ? ? <properties>

? ? ? ? ? ? <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

? ? ? ? ? ? <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

? ? ? ? ? ? <java.version>1.8</java.version>

? ? ? ? ? ? <spring-cloud.version>Finchley.RC2</spring-cloud.version>

? ? ? ? </properties>

? ? ? ? <dependencies>

? ? ? ? ? ? <dependency>

? ? ? ? ? ? ? ? <groupId>org.springframework.boot</groupId>

? ? ? ? ? ? ? ? <artifactId>spring-boot-starter-web</artifactId>

? ? ? ? ? ? </dependency>

? ? ? ? ? ? <dependency>

? ? ? ? ? ? ? ? <groupId>org.springframework.cloud</groupId>

? ? ? ? ? ? ? ? <artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>

? ? ? ? ? ? </dependency>

? ? ? ? ? ? <dependency>

? ? ? ? ? ? ? ? <groupId>org.springframework.boot</groupId>

? ? ? ? ? ? ? ? <artifactId>spring-boot-starter-test</artifactId>

? ? ? ? ? ? ? ? <scope>test</scope>

? ? ? ? ? ? </dependency>

? ? ? ? </dependencies>

? ? ? ? <dependencyManagement>

? ? ? ? ? ? <dependencies>

? ? ? ? ? ? ? ? <dependency>

? ? ? ? ? ? ? ? ? ? <groupId>org.springframework.cloud</groupId>

? ? ? ? ? ? ? ? ? ? <artifactId>spring-cloud-dependencies</artifactId>

? ? ? ? ? ? ? ? ? ? <version>${spring-cloud.version}</version>

? ? ? ? ? ? ? ? ? ? <type>pom</type>

? ? ? ? ? ? ? ? ? ? <scope>import</scope>

? ? ? ? ? ? ? ? </dependency>

? ? ? ? ? ? </dependencies>

? ? ? ? </dependencyManagement>

? ? ? ? <build>

? ? ? ? ? ? <plugins>

? ? ? ? ? ? ? ? <plugin>

? ? ? ? ? ? ? ? ? ? <groupId>org.springframework.boot</groupId>

? ? ? ? ? ? ? ? ? ? <artifactId>spring-boot-maven-plugin</artifactId>

? ? ? ? ? ? ? ? </plugin>

? ? ? ? ? ? </plugins>

? ? ? ? </build>

? ? ? ? <repositories>

? ? ? ? ? ? <repository>

? ? ? ? ? ? ? ? <id>spring-milestones</id>

? ? ? ? ? ? ? ? <name>Spring Milestones</name>

? ? ? ? ? ? ? ? <url>https://repo.spring.io/milestone</url>

? ? ? ? ? ? ? ? <snapshots>

? ? ? ? ? ? ? ? ? ? <enabled>false</enabled>

? ? ? ? ? ? ? ? </snapshots>

? ? ? ? ? ? </repository>

? ? ? ? </repositories>

? ? </project>

怎么證明它是Client呢

很簡單

在Spring-boot的啟動類上通過注解@EnableEurekaClient 表明自己是一個eurekaclient.

? ? package com.eureka.provider;

? ? import org.springframework.boot.SpringApplication;

? ? import org.springframework.boot.autoconfigure.SpringBootApplication;

? ? import org.springframework.cloud.netflix.eureka.EnableEurekaClient;

? ? import org.springframework.web.bind.annotation.GetMapping;

? ? import org.springframework.web.bind.annotation.RequestParam;

? ? import org.springframework.web.bind.annotation.ResponseBody;

? ? import org.springframework.web.bind.annotation.RestController;

? ? import java.util.HashMap;

? ? import java.util.Map;

? ? /**

? ? * Eureka客戶端

? ? */

? ? @RestController

? ? @EnableEurekaClient

? ? @SpringBootApplication

? ? public class ProviderApplication {


? ? ? ? public static void main(String[] args) {

? ? ? ? ? ? SpringApplication.run(ProviderApplication.class, args);

? ? ? ? }



? ? ? ? /**

? ? ? ? * 假如這個客戶端要提供一個getUser的方法

? ? ? ? * @return

? ? ? ? */

? ? ? ? @GetMapping(value = "/getUser")

? ? ? ? @ResponseBody

? ? ? ? public Map<String,Object> getUser(@RequestParam Integer id){

? ? ? ? ? ? Map<String,Object> data = new HashMap<>();

? ? ? ? ? ? data.put("id",id);

? ? ? ? ? ? data.put("userName","admin");

? ? ? ? ? ? data.put("from","provider-A");

? ? ? ? ? ? return data;

? ? ? ? }


? ? }

雖然加好了@EnableEurekaClient,總感覺差點什么,對了,配置文件yml

eureka:

? client:

? ? serviceUrl: #注冊中心的注冊地址

? ? ? defaultZone: http://127.0.0.1:8081/eureka/

server:

? port: 8082? #服務(wù)端口號

spring:

? application:

? ? name: service-provider #服務(wù)名稱--調(diào)用的時候根據(jù)名稱來調(diào)用該服務(wù)的方法

我們來啟動看看吧

我們看到這個客戶端已經(jīng)向注冊中心注冊服務(wù)了,那么我們打開Eureka-server飛機直達

我們看到我們啟動的服務(wù)是不是加進去了呢

我們看到我們的服務(wù)是不是加進去了呢。

那么有人會問,那一大堆飆紅的什么意思啊。因為注冊的服務(wù)都是高可用的,這里只檢測到一個服務(wù),產(chǎn)生的預(yù)警,不影響使用,等下我們啟動多個實例就不會了。

我們先來測試下客戶端的方法是否可用? 飛機直達

顯然是沒有問題,那么我們提供好了服務(wù),sei來消費呢?

下面我們就來建立一個消費者

為了更簡單易懂,我還是一步一步出圖吧。

來,貼上pom.xml

<?xml version="1.0" encoding="UTF-8"?>

<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/xsd/maven-4.0.0.xsd">

? ? <modelVersion>4.0.0</modelVersion>

? ? <groupId>com.eureka</groupId>

? ? <artifactId>consumer</artifactId>

? ? <version>0.0.1-SNAPSHOT</version>

? ? <packaging>jar</packaging>

? ? <name>consumer</name>

? ? <description>Demo project for Spring Boot</description>

? ? <parent>

? ? ? ? <groupId>org.springframework.boot</groupId>

? ? ? ? <artifactId>spring-boot-starter-parent</artifactId>

? ? ? ? <version>2.0.2.RELEASE</version>

? ? ? ? <relativePath/> <!-- lookup parent from repository -->

? ? </parent>

? ? <properties>

? ? ? ? <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

? ? ? ? <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

? ? ? ? <java.version>1.8</java.version>

? ? ? ? <spring-cloud.version>Finchley.RC2</spring-cloud.version>

? ? </properties>

? ? <dependencies>

? ? ? ? <dependency>

? ? ? ? ? ? <groupId>org.springframework.boot</groupId>

? ? ? ? ? ? <artifactId>spring-boot-starter-web</artifactId>

? ? ? ? </dependency>

? ? ? ? <dependency>

? ? ? ? ? ? <groupId>org.springframework.cloud</groupId>

? ? ? ? ? ? <artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>

? ? ? ? </dependency>

? ? ? ? <dependency>

? ? ? ? ? ? <groupId>org.springframework.boot</groupId>

? ? ? ? ? ? <artifactId>spring-boot-starter-test</artifactId>

? ? ? ? ? ? <scope>test</scope>

? ? ? ? </dependency>

? ? </dependencies>

? ? <dependencyManagement>

? ? ? ? <dependencies>

? ? ? ? ? ? <dependency>

? ? ? ? ? ? ? ? <groupId>org.springframework.cloud</groupId>

? ? ? ? ? ? ? ? <artifactId>spring-cloud-dependencies</artifactId>

? ? ? ? ? ? ? ? <version>${spring-cloud.version}</version>

? ? ? ? ? ? ? ? <type>pom</type>

? ? ? ? ? ? ? ? <scope>import</scope>

? ? ? ? ? ? </dependency>

? ? ? ? </dependencies>

? ? </dependencyManagement>

? ? <build>

? ? ? ? <plugins>

? ? ? ? ? ? <plugin>

? ? ? ? ? ? ? ? <groupId>org.springframework.boot</groupId>

? ? ? ? ? ? ? ? <artifactId>spring-boot-maven-plugin</artifactId>

? ? ? ? ? ? </plugin>

? ? ? ? </plugins>

? ? </build>

? ? <repositories>

? ? ? ? <repository>

? ? ? ? ? ? <id>spring-milestones</id>

? ? ? ? ? ? <name>Spring Milestones</name>

? ? ? ? ? ? <url>https://repo.spring.io/milestone</url>

? ? ? ? ? ? <snapshots>

? ? ? ? ? ? ? ? <enabled>false</enabled>

? ? ? ? ? ? </snapshots>

? ? ? ? </repository>

? ? </repositories>

</project>

主要是啟動類,里面內(nèi)容就豐富啦,都在注釋里

package com.eureka.consumer;

import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.boot.SpringApplication;

import org.springframework.boot.autoconfigure.SpringBootApplication;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;

import org.springframework.cloud.netflix.eureka.EnableEurekaClient;

import org.springframework.context.annotation.Bean;

import org.springframework.web.bind.annotation.GetMapping;

import org.springframework.web.bind.annotation.RequestParam;

import org.springframework.web.bind.annotation.ResponseBody;

import org.springframework.web.bind.annotation.RestController;

import org.springframework.web.client.RestTemplate;

import java.util.HashMap;

import java.util.Map;

/**

* Eureka客戶端-消費者

*/

@RestController

@EnableEurekaClient

@SpringBootApplication

public class ConsumerApplication {

? ? @Autowired

? ? RestTemplate restTemplate;

? ? public static void main(String[] args) {

? ? ? ? SpringApplication.run(ConsumerApplication.class, args);

? ? }

? ? /**

? ? * 實例化RestTemplate

? ? * @return

? ? */

? ? @LoadBalanced

? ? @Bean

? ? public RestTemplate rest() {

? ? ? ? return new RestTemplate();

? ? }

? ? /**

? ? * Rest服務(wù)端使用RestTemplate發(fā)起http請求,然后得到數(shù)據(jù)返回給前端----gotoUser是為了區(qū)分getUser怕小伙伴暈頭

? ? * @param id

? ? * @return

? ? */

? ? @GetMapping(value = "/gotoUser")

? ? @ResponseBody

? ? public Map<String,Object> getUser(@RequestParam Integer id){

? ? ? ? Map<String,Object> data = new HashMap<>();

? ? ? ? /**

? ? ? ? * 小伙伴發(fā)現(xiàn)沒有,地址居然是http://service-provider

? ? ? ? * 居然不是http://127.0.0.1:8082/

? ? ? ? * 因為他向注冊中心注冊了服務(wù),服務(wù)名稱service-provider,我們訪問service-provider即可

? ? ? ? */

? ? ? ? data = restTemplate.getForObject("http://service-provider/getUser?id="+id,Map.class);

? ? ? ? return data;

? ? }

}

配置文件和

eureka:

? client:

? ? serviceUrl: #注冊中心的注冊地址

? ? ? defaultZone: http://127.0.0.1:8081/eureka/

server:

? port: 8083? #服務(wù)端口號

spring:

? application:

? ? name: service-consumer #服務(wù)名稱--調(diào)用的時候根據(jù)名稱來調(diào)用該服務(wù)的方法

我們啟動看看效果吧

看看我們的提供者和消費者是不是都進來了

那么我們看看我們消費者的方法是否可用? 飛機直達

哈哈,是不是很神奇

下面介紹個更神奇的東西--實現(xiàn)微服務(wù)負載均衡

我們把服務(wù)提供者復(fù)制一個工程出來,我們再做下小小的修改,看看是否能實現(xiàn)負載均衡。

我們需要修改兩個文件

一個是啟動類,改了哪些呢?看看就曉得咯

package com.eureka.provider;

import org.springframework.boot.SpringApplication;

import org.springframework.boot.autoconfigure.SpringBootApplication;

import org.springframework.cloud.netflix.eureka.EnableEurekaClient;

import org.springframework.web.bind.annotation.GetMapping;

import org.springframework.web.bind.annotation.RequestParam;

import org.springframework.web.bind.annotation.ResponseBody;

import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

import java.util.Map;

/**

* Eureka客戶端

*/

@RestController

@EnableEurekaClient

@SpringBootApplication

public class ProviderApplication {

? ? public static void main(String[] args) {

? ? ? ? SpringApplication.run(ProviderApplication.class, args);

? ? }

? ? /**

? ? * 假如這個客戶端要提供一個getUser的方法

? ? * @return

? ? */

? ? @GetMapping(value = "/getUser")

? ? @ResponseBody

? ? public Map<String,Object> getUser(@RequestParam Integer id){

? ? ? ? Map<String,Object> data = new HashMap<>();

? ? ? ? data.put("id",id);

? ? ? ? data.put("userName","admin");

? ? ? ? data.put("from","provider-B");//改這里是為了讓大家更能理解它負載均衡的機制

? ? ? ? return data;

? ? }

}

還有就是yml配置文件

eureka:

? client:

? ? serviceUrl: #注冊中心的注冊地址

? ? ? defaultZone: http://127.0.0.1:8081/eureka/

server:

? port: 8088? #服務(wù)端口號--該端口不要沖突

spring:

? application:

? ? name: service-provider #服務(wù)名稱--調(diào)用的時候根據(jù)名稱來調(diào)用該服務(wù)的方法--名字絕對不能改,改了就訪問不到了

我們來啟動一下吧

看看Eureka-server后臺的效果? ? ServerA? ? ? ServerB? ?

這個叫做Service-provider是不是有兩個實例啊

那么,我們分別訪問一下,看看效果怎么樣

看到了嗎,8082端口,from是provider-A,8088端口,from是provider-B.

那么我們訪問消費者的服務(wù)器看看會出現(xiàn)什么樣的情況呢? 飛機直達

一開始是from A,你刷新一下,誒? 變成 from B了。

說明這個時候兩臺提供者在交替工作,從而達到了一個負載均衡的作用。

來來來,我給你畫個圖

每個微服務(wù)都是一個Eureka-Client,我們把每個app(SpringBootApplication)都向注冊中心注冊一個服務(wù)。

有時候,某個服務(wù)的工作量比較大的時候,我們可以多注冊幾個同名稱的微服務(wù),從而讓他們交替工作,減輕單個服務(wù)的壓力。

————————————————

版權(quán)聲明:本文為CSDN博主「TIny1995」的原創(chuàng)文章,遵循 CC 4.0 BY-SA 版權(quán)協(xié)議,轉(zhuǎn)載請附上原文出處鏈接及本聲明。

原文鏈接:https://blog.csdn.net/nanbiebao6522/article/details/80574463

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

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