一、创建父模块infrastructure

1、创建模块

在guli_parent下创建普通maven模块

Artifact:infrastructure

2、删除src目录

二、创建模块api_gateway

1、创建模块

在infrastructure下创建普通maven模块

Artifact:api_gateway

2、配置pom

在api_gateway的pom中添加如下依赖

<dependencies>
<!-- 网关 -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-gateway</artifactId>
</dependency>
</dependencies>

3、配置application.yml

server:
port: 9110 # 服务端口 spring:
profiles:
active: dev # 环境设置
application:
name: infrastructure-apigateway # 服务名

4、logback.xml

修改日志输出的目录名为 apigateway

 <property name="log.path" value="D:/project/helen/guli_log/apigateway" />

5、创建启动类

package com.atguigu.guli.infrastructure.apigateway;

@SpringBootApplication
public class InfrastructureApiGatewayApplication { public static void main(String[] args) {
SpringApplication.run(InfrastructureApiGatewayApplication.class, args);
}
}

6、启动网关

最新文章

  1. slide效果
  2. 根据条件动态拼接LinQ的where条件字串
  3. php strrpos()与strripos()函数不同之处在哪里呢
  4. IE浏览器模式设置
  5. C# WebRequestExtensions
  6. [ CodeVS冲杯之路 ] P1092
  7. Android:单元测试
  8. TreeMap与TreeSet的实现
  9. 转:C#整数三种强制类型转换int、Convert.ToInt32()、int.Parse()的区别
  10. selenium 学习笔记 ---新手学习记录(9) 问题总结(java)
  11. hive on spark的安装及问题
  12. #define和typedef在windows上的应用
  13. 》》stroll--各种特效下拉菜单
  14. 操作系统与cpu
  15. iframe实现Ajax文件上传效果示例
  16. JS 字符串两边截取空白的trim()方法的封装
  17. mysql 存储过程 有数据修改 没数据插入
  18. window对象方法之setTimeout(),setInterval()
  19. Intellij IDEA导入web项目详解(解决访问的404)
  20. USB2.0相关应用笔记集锦

热门文章

  1. Erlang那些事儿第2回之我是模块(module),一文件一模块
  2. Java 从 Map 到 HashMap 的一步步实现
  3. C#未能找到路径“\bin\roslyn\csc.exe”的一部分。
  4. html中table表格标题固定表数据行出现滚动条
  5. Selenium Web元素操作
  6. Spring Boot 中使用 Quartz 实现任务调度
  7. 设计模式之-Builder模式
  8. 大白话Java多线程,小白都能看的懂的哦
  9. Java学习日报7.31
  10. 基于Let&#39;s Encrypt生成免费证书-支持多域名泛域名证书