摘要: 一、部署jar包 1.在项目目录下,输入mvn install 2.输入以下命令运行 java -jar target/demo_zhang-0.0.1-SNAPSHOT.jar 3.http://127.0.0.1:8080/hello 二、部署war包 1.application新加@Servl 阅读全文
posted @ 2020-11-20 10:09 脑袋有点大 阅读(89) 评论(0) 推荐(0) 编辑
摘要: 1.new project 2.spring intializr 3.填写组织名称和项目名 4.左边选择web,右边选择springweb 5.指定项目路径后就完成了 6.新建com.example.demo_zhang.web,在其目录下新建类HelloController。 package co 阅读全文
posted @ 2020-11-19 11:48 脑袋有点大 阅读(70) 评论(0) 推荐(0) 编辑
摘要: 1.创建网关项目zuul 2.pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="ht 阅读全文
posted @ 2020-11-19 08:43 脑袋有点大 阅读(65) 评论(0) 推荐(0) 编辑
摘要: 1.创建子项目turbine 2.pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" 阅读全文
posted @ 2020-11-18 17:44 脑袋有点大 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 1.创建hystrix-dashboard子项目 2.添加pom.xml包 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:sch 阅读全文
posted @ 2020-11-18 11:45 脑袋有点大 阅读(103) 评论(0) 推荐(0) 编辑
摘要: 1.pom.xml 增加断路器相关包 <!--断路器--> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-hystrix</artifactId> 阅读全文
posted @ 2020-11-17 17:44 脑袋有点大 阅读(41) 评论(0) 推荐(0) 编辑
摘要: 1.在view端pom.xml增加如下。 <!--用于访问路径/actuator/bus-refresh--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actua 阅读全文
posted @ 2020-11-17 14:54 脑袋有点大 阅读(64) 评论(0) 推荐(0) 编辑
摘要: 1.在视图微服务product-view的pom.xml中增加 <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-config</artifactId> </depen 阅读全文
posted @ 2020-11-17 11:55 脑袋有点大 阅读(86) 评论(0) 推荐(0) 编辑
摘要: 1.创建config-server 2.pom.xml配置 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocat 阅读全文
posted @ 2020-11-17 08:41 脑袋有点大 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 改造product-data-service和product-view-service服务。 1.两个服务中pom.xml都添加zipkin包 <!--链路追踪 zipkin--> <dependency> <groupId>org.springframework.cloud</groupId> < 阅读全文
posted @ 2020-11-16 16:10 脑袋有点大 阅读(78) 评论(0) 推荐(0) 编辑