✨ gateway创建
This commit is contained in:
parent
1d1c788d1f
commit
7960a6f879
|
@ -0,0 +1,70 @@
|
|||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
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>
|
||||
<parent>
|
||||
<groupId>cn.bunny.mq</groupId>
|
||||
<artifactId>cloud-demo</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>gateway</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>gateway</name>
|
||||
<url>http://maven.apache.org</url>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>cn.bunny.mq</groupId>
|
||||
<artifactId>model</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- web -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-webflux</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- thymeleaf -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-thymeleaf</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- devtools -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-devtools</artifactId>
|
||||
<scope>runtime</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<!-- test -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- alibaba -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-gateway</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</project>
|
|
@ -0,0 +1,12 @@
|
|||
package cn.bunny.gateway;
|
||||
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class GateWayMainApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(GateWayMainApplication.class, args);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package cn.bunny.gateway.controller;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
||||
@Controller
|
||||
public class IndexController {
|
||||
|
||||
@GetMapping()
|
||||
public String index() {
|
||||
return "index";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
server:
|
||||
port: 8888
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: gateway
|
||||
cloud:
|
||||
nacos:
|
||||
server-addr: 192.168.3.150:8848
|
|
@ -0,0 +1,10 @@
|
|||
_ _
|
||||
| |__ _ _ _ __ _ __ _ _ (_) __ ___ ____ _
|
||||
| '_ \| | | | '_ \| '_ \| | | | | |/ _` \ \ / / _` |
|
||||
| |_) | |_| | | | | | | | |_| | | | (_| |\ V | (_| |
|
||||
|_.__/ \__,_|_| |_|_| |_|\__, | _/ |\__,_| \_/ \__,_|
|
||||
|___/ |__/
|
||||
|
||||
Service Name${spring.application.name}
|
||||
SpringBoot Version: ${spring-boot.version}${spring-boot.formatted-version}
|
||||
SpringActive:${spring.profiles.active}
|
|
@ -0,0 +1,69 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<contextName>logback</contextName>
|
||||
|
||||
<!-- 格式化 年-月-日 输出 -->
|
||||
<timestamp key="datetime" datePattern="yyyy-MM-dd"/>
|
||||
|
||||
<!--编码-->
|
||||
<property name="ENCODING" value="UTF-8"/>
|
||||
|
||||
<!-- 控制台日志 -->
|
||||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<!-- 临界值过滤器 -->
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<level>INFO</level>
|
||||
</filter>
|
||||
<encoder>
|
||||
<pattern>%cyan([%thread %d{yyyy-MM-dd HH:mm:ss}]) %yellow(%-5level) %green(%logger{100}).%boldRed(%method)-%boldMagenta(%line)-%blue(%msg%n)
|
||||
</pattern>
|
||||
<charset>${ENCODING}</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 文件日志 -->
|
||||
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
|
||||
<file>logs/${datetime}/financial-server.log</file>
|
||||
<append>true</append>
|
||||
<encoder>
|
||||
<pattern>%date{yyyy-MM-dd HH:mm:ss} [%-5level] %thread %file:%line %logger %msg%n</pattern>
|
||||
<charset>${ENCODING}</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 让SpringBoot内部日志ERROR级别 减少日志输出 -->
|
||||
<logger name="org.springframework" level="ERROR" additivity="false">
|
||||
<appender-ref ref="STOUT"/>
|
||||
</logger>
|
||||
|
||||
<!-- 让mybatis整合包日志ERROR 减少日志输出 -->
|
||||
<logger name="org.mybatis" level="ERROR" additivity="false">
|
||||
<appender-ref ref="STOUT"/>
|
||||
</logger>
|
||||
|
||||
<!-- 让ibatis 日志ERROR 减少日志输出 -->
|
||||
<logger name="org.apache.ibatis" level="ERROR" additivity="false">
|
||||
<appender-ref ref="STOUT"/>
|
||||
</logger>
|
||||
|
||||
<!-- 让 tomcat包打印日志 日志ERROR 减少日志输出 -->
|
||||
<logger name="org.apache" level="ERROR" additivity="false">
|
||||
<appender-ref ref="STOUT"/>
|
||||
</logger>
|
||||
|
||||
<!-- 我们自己开发的程序为DEBUG -->
|
||||
<logger name="cn.bunny" level="DEBUG" additivity="false">
|
||||
<appender-ref ref="STOUT"/>
|
||||
</logger>
|
||||
|
||||
<logger name="com.baomidou" level="ERROR" additivity="false">
|
||||
<appender-ref ref="STOUT"/>
|
||||
</logger>
|
||||
|
||||
<!-- 根日志记录器:INFO级别 -->
|
||||
<root level="INFO">
|
||||
<appender-ref ref="CONSOLE"/>
|
||||
<appender-ref ref="FILE"/>
|
||||
</root>
|
||||
|
||||
</configuration>
|
|
@ -0,0 +1,69 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>400 错误 - phpstudy</title>
|
||||
<meta content="" name="keywords">
|
||||
<meta content="" name="description">
|
||||
<meta content="webkit" name="renderer">
|
||||
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">
|
||||
<meta content="black" name="apple-mobile-web-app-status-bar-style">
|
||||
<meta content="yes" name="apple-mobile-web-app-capable">
|
||||
<meta content="telephone=no" name="format-detection">
|
||||
<meta CONTENT="no-cache" HTTP-EQUIV="pragma">
|
||||
<meta CONTENT="no-store, must-revalidate" HTTP-EQUIV="Cache-Control">
|
||||
<meta CONTENT="Wed, 26 Feb 1997 08:21:57 GMT" HTTP-EQUIV="expires">
|
||||
<meta CONTENT="0" HTTP-EQUIV="expires">
|
||||
<style>
|
||||
body {
|
||||
font: 16px arial, 'Microsoft Yahei', 'Hiragino Sans GB', sans-serif;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
color: #3a87ad;
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 45%;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
|
||||
.content > div {
|
||||
margin-top: 200px;
|
||||
padding: 20px;
|
||||
background: #d9edf7;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.content dl {
|
||||
color: #2d6a88;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.content div div {
|
||||
padding-bottom: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
<div>
|
||||
<h1>HTTP 400 - Bad Request</h1>
|
||||
<dl>
|
||||
<dt>错误说明:因为错误的语法导致服务器无法理解请求信息。</dt>
|
||||
<dt>原因1:客户端发起的请求不符合服务器对请求的某些限制,或者请求本身存在一定的错误。</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>链接中有特殊字符或者链接长度过长导致,请对应修改.</dd>
|
||||
<dt>原因2:request header 或者 cookie 过大所引起</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>crtl+shift+delete 快捷键清除cookie.</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,69 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>403 错误 - phpstudy</title>
|
||||
<meta content="" name="keywords">
|
||||
<meta content="" name="description">
|
||||
<meta content="webkit" name="renderer">
|
||||
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">
|
||||
<meta content="black" name="apple-mobile-web-app-status-bar-style">
|
||||
<meta content="yes" name="apple-mobile-web-app-capable">
|
||||
<meta content="telephone=no" name="format-detection">
|
||||
<meta CONTENT="no-cache" HTTP-EQUIV="pragma">
|
||||
<meta CONTENT="no-store, must-revalidate" HTTP-EQUIV="Cache-Control">
|
||||
<meta CONTENT="Wed, 26 Feb 1997 08:21:57 GMT" HTTP-EQUIV="expires">
|
||||
<meta CONTENT="0" HTTP-EQUIV="expires">
|
||||
<style>
|
||||
body {
|
||||
font: 16px arial, 'Microsoft Yahei', 'Hiragino Sans GB', sans-serif;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
color: #3a87ad;
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 45%;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
|
||||
.content > div {
|
||||
margin-top: 200px;
|
||||
padding: 20px;
|
||||
background: #d9edf7;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.content dl {
|
||||
color: #2d6a88;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.content div div {
|
||||
padding-bottom: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
<div>
|
||||
<h1>403 - Forbidden 禁止访问: 访问被拒绝</h1>
|
||||
<dl>
|
||||
<dt>错误说明:禁止访问,服务器拒绝访问</dt>
|
||||
<dt>原因1:未找到默认的索引文件</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>IIS中【启用默认内容文档】选项中将默认打开文档修改为程序首页文件格式,如:index.html或者index.php</dd>
|
||||
<dt>原因2:文件夹安全权限导致</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>程序文件-右击-属性-安全-Users-修改为读取和执行权限</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,78 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>404 错误 - phpstudy</title>
|
||||
<meta content="" name="keywords">
|
||||
<meta content="" name="description">
|
||||
<meta content="webkit" name="renderer">
|
||||
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">
|
||||
<meta content="black" name="apple-mobile-web-app-status-bar-style">
|
||||
<meta content="yes" name="apple-mobile-web-app-capable">
|
||||
<meta content="telephone=no" name="format-detection">
|
||||
<meta CONTENT="no-cache" HTTP-EQUIV="pragma">
|
||||
<meta CONTENT="no-store, must-revalidate" HTTP-EQUIV="Cache-Control">
|
||||
<meta CONTENT="Wed, 26 Feb 1997 08:21:57 GMT" HTTP-EQUIV="expires">
|
||||
<meta CONTENT="0" HTTP-EQUIV="expires">
|
||||
<style>
|
||||
body {
|
||||
font: 16px arial, 'Microsoft Yahei', 'Hiragino Sans GB', sans-serif;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
color: #3a87ad;
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 45%;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
|
||||
.content > div {
|
||||
margin-top: 50px;
|
||||
padding: 20px;
|
||||
background: #d9edf7;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.content dl {
|
||||
color: #2d6a88;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.content div div {
|
||||
padding-bottom: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
<div>
|
||||
<h1>404 - Page Not Found 未找到</h1>
|
||||
<dl>
|
||||
<dt>错误说明:请求的页面不存在</dt>
|
||||
<dt>原因1:访问的文档权限不够</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>修改文件权限为755,windos系统修改目录权限为可写可读。</dd>
|
||||
<dt>原因2:防火墙的原因</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>先关闭让防火墙通过WWW服务。</dd>
|
||||
<dt>原因3:站点根目录无默认访问文件</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>在根目录中创建index.html或者创建index.php。</dd>
|
||||
<dt>原因4:站点配置目录不正确</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>将网站应用程序复制到站点目录中,或者修改站点配置目录指定到应用程序目录中。</dd>
|
||||
<dt>原因5:站点使用了伪静态</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>将伪静态规则删除,或者重新编写正确的伪静态规则,或关闭伪静态配置。</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,64 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-cmn-Hans">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>500 - 服务器错误</title>
|
||||
<meta content="width=device-width, maximum-scale=1, initial-scale=1" name="viewport"/>
|
||||
<style>
|
||||
html, body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
color: #333;
|
||||
margin: auto;
|
||||
padding: 1em;
|
||||
display: table;
|
||||
user-select: none;
|
||||
box-sizing: border-box;
|
||||
font: lighter 20px "微软雅黑";
|
||||
}
|
||||
|
||||
a {
|
||||
color: #3498db;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin-top: 0;
|
||||
font-size: 3.5em;
|
||||
}
|
||||
|
||||
main {
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.btn {
|
||||
color: #fff;
|
||||
padding: .75em 1em;
|
||||
background: #3498db;
|
||||
border-radius: 1.5em;
|
||||
display: inline-block;
|
||||
transition: opacity .3s, transform .3s;
|
||||
}
|
||||
|
||||
.btn:hover {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.btn:active {
|
||||
opacity: .7;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<h1>:'(</h1>
|
||||
<p>服务器开小差啦!管理员正在修理中...</p>
|
||||
<p>还请阁下静候站点恢复~</p>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,66 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>501 错误 - phpstudy</title>
|
||||
<meta content="" name="keywords">
|
||||
<meta content="" name="description">
|
||||
<meta content="webkit" name="renderer">
|
||||
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">
|
||||
<meta content="black" name="apple-mobile-web-app-status-bar-style">
|
||||
<meta content="yes" name="apple-mobile-web-app-capable">
|
||||
<meta content="telephone=no" name="format-detection">
|
||||
<meta CONTENT="no-cache" HTTP-EQUIV="pragma">
|
||||
<meta CONTENT="no-store, must-revalidate" HTTP-EQUIV="Cache-Control">
|
||||
<meta CONTENT="Wed, 26 Feb 1997 08:21:57 GMT" HTTP-EQUIV="expires">
|
||||
<meta CONTENT="0" HTTP-EQUIV="expires">
|
||||
<style>
|
||||
body {
|
||||
font: 16px arial, 'Microsoft Yahei', 'Hiragino Sans GB', sans-serif;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
color: #3a87ad;
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 45%;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
|
||||
.content > div {
|
||||
margin-top: 200px;
|
||||
padding: 20px;
|
||||
background: #d9edf7;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.content dl {
|
||||
color: #2d6a88;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.content div div {
|
||||
padding-bottom: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
<div>
|
||||
<h1>HTTP 501 - Not Implemented</h1>
|
||||
<dl>
|
||||
<dt>错误说明:服务器没有相应的执行动作来完成当前请求。</dt>
|
||||
<dt>原因1:Web 服务器不支持实现此请求所需的功能</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>可以用来HttpWebRequest指定一个UserAgent来试试的,有时候你可以换电脑来测试一下的。</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,80 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>502 错误 - phpstudy</title>
|
||||
<meta content="" name="keywords">
|
||||
<meta content="" name="description">
|
||||
<meta content="webkit" name="renderer">
|
||||
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">
|
||||
<meta content="black" name="apple-mobile-web-app-status-bar-style">
|
||||
<meta content="yes" name="apple-mobile-web-app-capable">
|
||||
<meta content="telephone=no" name="format-detection">
|
||||
<meta CONTENT="no-cache" HTTP-EQUIV="pragma">
|
||||
<meta CONTENT="no-store, must-revalidate" HTTP-EQUIV="Cache-Control">
|
||||
<meta CONTENT="Wed, 26 Feb 1997 08:21:57 GMT" HTTP-EQUIV="expires">
|
||||
<meta CONTENT="0" HTTP-EQUIV="expires">
|
||||
<style>
|
||||
body {
|
||||
font: 16px arial, 'Microsoft Yahei', 'Hiragino Sans GB', sans-serif;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
color: #3a87ad;
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 45%;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
|
||||
.content > div {
|
||||
margin-top: 50px;
|
||||
padding: 20px;
|
||||
background: #d9edf7;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.content dl {
|
||||
color: #2d6a88;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.content div div {
|
||||
padding-bottom: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
<div>
|
||||
<h1>HTTP 502 - Bad Gateway 没有响应</h1>
|
||||
<dl>
|
||||
<dt>错误说明:坏的网关,http向后端节点请求,没有响应</dt>
|
||||
<dt>原因1:DNS 缓冲</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>在dos窗口运行 ipconfig /flushdns,该命令会刷新DNS缓冲。</dd>
|
||||
<dt>原因2:浏览器代理</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>关掉代理。</dd>
|
||||
<dt>原因3:dns 被劫持了,即使使用国外的dns,也会被劫持</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>
|
||||
去掉VPN服务器的DNS。切换另外的dns。在windows系统中,可以在本地网络连接的属性中,去掉默认的dns,选用国外的dns,比如google的或opendns。
|
||||
</dd>
|
||||
<dt>原因4:php执行超时</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>修改/usr/local/php/etc/php.ini 将max_execution_time 改为300。</dd>
|
||||
<dt>原因5:nginx等待时间超时</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>适当增加nginx.conf配置文件中FastCGI的timeout时间。</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,69 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>503 错误 - phpstudy</title>
|
||||
<meta content="" name="keywords">
|
||||
<meta content="" name="description">
|
||||
<meta content="webkit" name="renderer">
|
||||
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">
|
||||
<meta content="black" name="apple-mobile-web-app-status-bar-style">
|
||||
<meta content="yes" name="apple-mobile-web-app-capable">
|
||||
<meta content="telephone=no" name="format-detection">
|
||||
<meta CONTENT="no-cache" HTTP-EQUIV="pragma">
|
||||
<meta CONTENT="no-store, must-revalidate" HTTP-EQUIV="Cache-Control">
|
||||
<meta CONTENT="Wed, 26 Feb 1997 08:21:57 GMT" HTTP-EQUIV="expires">
|
||||
<meta CONTENT="0" HTTP-EQUIV="expires">
|
||||
<style>
|
||||
body {
|
||||
font: 16px arial, 'Microsoft Yahei', 'Hiragino Sans GB', sans-serif;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
color: #3a87ad;
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 45%;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
|
||||
.content > div {
|
||||
margin-top: 200px;
|
||||
padding: 20px;
|
||||
background: #d9edf7;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.content dl {
|
||||
color: #2d6a88;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.content div div {
|
||||
padding-bottom: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
<div>
|
||||
<h1>HTTP 503 - Service Unavailable 服务不可用</h1>
|
||||
<dl>
|
||||
<dt>错误说明:服务当前不可用</dt>
|
||||
<dt>原因1:服务不可用状态</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>服务器或许就是正在维护或者暂停了,你可以联系一下服务器空间商。</dd>
|
||||
<dt>原因2:程序占用资源太多</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>通过设置应用程序池把账户改为NetworkService即可解决。</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,81 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>504 错误 - phpstudy</title>
|
||||
<meta content="" name="keywords">
|
||||
<meta content="" name="description">
|
||||
<meta content="webkit" name="renderer">
|
||||
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">
|
||||
<meta content="black" name="apple-mobile-web-app-status-bar-style">
|
||||
<meta content="yes" name="apple-mobile-web-app-capable">
|
||||
<meta content="telephone=no" name="format-detection">
|
||||
<meta CONTENT="no-cache" HTTP-EQUIV="pragma">
|
||||
<meta CONTENT="no-store, must-revalidate" HTTP-EQUIV="Cache-Control">
|
||||
<meta CONTENT="Wed, 26 Feb 1997 08:21:57 GMT" HTTP-EQUIV="expires">
|
||||
<meta CONTENT="0" HTTP-EQUIV="expires">
|
||||
<style>
|
||||
body {
|
||||
font: 16px arial, 'Microsoft Yahei', 'Hiragino Sans GB', sans-serif;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
color: #3a87ad;
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 45%;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
|
||||
.content > div {
|
||||
margin-top: 50px;
|
||||
padding: 20px;
|
||||
background: #d9edf7;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.content dl {
|
||||
color: #2d6a88;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.content div div {
|
||||
padding-bottom: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
<div>
|
||||
<h1>HTTP 504 - Gateway Timeout 网关超时</h1>
|
||||
<dl>
|
||||
<dt>错误说明:网关超时,服务器响应时间,达到超出设定的范围</dt>
|
||||
<dt>原因1:后端电脑之间 IP 通讯缓慢而产生</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>如果您的 Web 服务器由某一网站托管, 只有负责那个网站设置的人员才能解决这个问题。</dd>
|
||||
<dt>原因2:由于nginx默认的fastcgi进程响应的缓冲区太小造成的错误</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>一般默认的fastcgi进程响应的缓冲区是8K,这时可以设置大一点,在nginx.conf里,加入:fastcgi_buffers 8
|
||||
128k这表示设置fastcgi缓冲区为8块128k大小的空间。当然如果在进行某一项即时的操作, 可能需要nginx的超时参数调大点,
|
||||
例如设置成60秒:send_timeout 60;经过这两个参数的调整,一般不会再提示“504 Gateway Time-out”错误,问题基本解决。
|
||||
</dd>
|
||||
<dt>原因3:PHP环境的配置问题</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>更改php-fpm的几处配置: 把max_children由之前的10改为现在的30,这样就可以保证有充足的php-cgi进程可以被使用;
|
||||
把request_terminate_timeout由之前的0s改为60s,这样php-cgi进程 处理脚本的超时时间就是60秒,可以防止进程都被挂起,提高利用效率。
|
||||
接着再更改nginx的几个配置项,减少FastCGI的请求次数,尽量维持buffers不变: fastcgi_buffers由 4 64k 改为 2
|
||||
256k; fastcgi_buffer_size 由 64k 改为 128K; fastcgi_busy_buffers_size 由 128K 改为 256K;
|
||||
fastcgi_temp_file_write_size 由 128K 改为 256K。 重新加载php-fpm和nginx的配置,再次测试,如果没有出现“504
|
||||
Gateway Time-out”错误,问题解决。
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,72 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>505 错误 - phpstudy</title>
|
||||
<meta content="" name="keywords">
|
||||
<meta content="" name="description">
|
||||
<meta content="webkit" name="renderer">
|
||||
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">
|
||||
<meta content="black" name="apple-mobile-web-app-status-bar-style">
|
||||
<meta content="yes" name="apple-mobile-web-app-capable">
|
||||
<meta content="telephone=no" name="format-detection">
|
||||
<meta CONTENT="no-cache" HTTP-EQUIV="pragma">
|
||||
<meta CONTENT="no-store, must-revalidate" HTTP-EQUIV="Cache-Control">
|
||||
<meta CONTENT="Wed, 26 Feb 1997 08:21:57 GMT" HTTP-EQUIV="expires">
|
||||
<meta CONTENT="0" HTTP-EQUIV="expires">
|
||||
<style>
|
||||
body {
|
||||
font: 16px arial, 'Microsoft Yahei', 'Hiragino Sans GB', sans-serif;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
color: #3a87ad;
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 45%;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
|
||||
.content > div {
|
||||
margin-top: 200px;
|
||||
padding: 20px;
|
||||
background: #d9edf7;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.content dl {
|
||||
color: #2d6a88;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.content div div {
|
||||
padding-bottom: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
<div>
|
||||
<h1>HTTP 505 - HTTP Version Not Supported</h1>
|
||||
<dl>
|
||||
<dt>错误说明:HTTP 版本不受支持。</dt>
|
||||
<dt>原因1:您的 Web 服务器不支持,或拒绝支持客户端(如您的浏览器)在发送给服务器的 HTTP 请求数据流中指定的 HTTP
|
||||
协议版本
|
||||
</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>升级您的 Web 服务器软件。</dd>
|
||||
<dt>原因2:http请求格式的错误</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>对照一下自己的代码,从打印的信息中终于找到问题所在。可能在请求后面多加了一个空格。http协议真是很严格了。
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,66 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>506 错误 - phpstudy</title>
|
||||
<meta content="" name="keywords">
|
||||
<meta content="" name="description">
|
||||
<meta content="webkit" name="renderer">
|
||||
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">
|
||||
<meta content="black" name="apple-mobile-web-app-status-bar-style">
|
||||
<meta content="yes" name="apple-mobile-web-app-capable">
|
||||
<meta content="telephone=no" name="format-detection">
|
||||
<meta CONTENT="no-cache" HTTP-EQUIV="pragma">
|
||||
<meta CONTENT="no-store, must-revalidate" HTTP-EQUIV="Cache-Control">
|
||||
<meta CONTENT="Wed, 26 Feb 1997 08:21:57 GMT" HTTP-EQUIV="expires">
|
||||
<meta CONTENT="0" HTTP-EQUIV="expires">
|
||||
<style>
|
||||
body {
|
||||
font: 16px arial, 'Microsoft Yahei', 'Hiragino Sans GB', sans-serif;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
color: #3a87ad;
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 45%;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
|
||||
.content > div {
|
||||
margin-top: 200px;
|
||||
padding: 20px;
|
||||
background: #d9edf7;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.content dl {
|
||||
color: #2d6a88;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.content div div {
|
||||
padding-bottom: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
<div>
|
||||
<h1>HTTP 506 - Variant Also Negotiates</h1>
|
||||
<dl>
|
||||
<dt>错误说明:</dt>
|
||||
<dt>原因1:服务器存在内部配置错误</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>被请求的协商变元资源被配置为在透明内容协商中使用自己,因此在一个协商处理中不是一个合适的重点。</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,66 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>507 错误 - phpstudy</title>
|
||||
<meta content="" name="keywords">
|
||||
<meta content="" name="description">
|
||||
<meta content="webkit" name="renderer">
|
||||
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">
|
||||
<meta content="black" name="apple-mobile-web-app-status-bar-style">
|
||||
<meta content="yes" name="apple-mobile-web-app-capable">
|
||||
<meta content="telephone=no" name="format-detection">
|
||||
<meta CONTENT="no-cache" HTTP-EQUIV="pragma">
|
||||
<meta CONTENT="no-store, must-revalidate" HTTP-EQUIV="Cache-Control">
|
||||
<meta CONTENT="Wed, 26 Feb 1997 08:21:57 GMT" HTTP-EQUIV="expires">
|
||||
<meta CONTENT="0" HTTP-EQUIV="expires">
|
||||
<style>
|
||||
body {
|
||||
font: 16px arial, 'Microsoft Yahei', 'Hiragino Sans GB', sans-serif;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
color: #3a87ad;
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 45%;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
|
||||
.content > div {
|
||||
margin-top: 200px;
|
||||
padding: 20px;
|
||||
background: #d9edf7;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.content dl {
|
||||
color: #2d6a88;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.content div div {
|
||||
padding-bottom: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
<div>
|
||||
<h1>HTTP 507 - Insufficient Storage</h1>
|
||||
<dl>
|
||||
<dt>错误说明:</dt>
|
||||
<dt>原因1:服务器无法存储完成请求所必须的内容</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>这个状况被认为是临时的。WebDAV (RFC 4918)。</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,66 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>509 错误 - phpstudy</title>
|
||||
<meta content="" name="keywords">
|
||||
<meta content="" name="description">
|
||||
<meta content="webkit" name="renderer">
|
||||
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">
|
||||
<meta content="black" name="apple-mobile-web-app-status-bar-style">
|
||||
<meta content="yes" name="apple-mobile-web-app-capable">
|
||||
<meta content="telephone=no" name="format-detection">
|
||||
<meta CONTENT="no-cache" HTTP-EQUIV="pragma">
|
||||
<meta CONTENT="no-store, must-revalidate" HTTP-EQUIV="Cache-Control">
|
||||
<meta CONTENT="Wed, 26 Feb 1997 08:21:57 GMT" HTTP-EQUIV="expires">
|
||||
<meta CONTENT="0" HTTP-EQUIV="expires">
|
||||
<style>
|
||||
body {
|
||||
font: 16px arial, 'Microsoft Yahei', 'Hiragino Sans GB', sans-serif;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
color: #3a87ad;
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 45%;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
|
||||
.content > div {
|
||||
margin-top: 200px;
|
||||
padding: 20px;
|
||||
background: #d9edf7;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.content dl {
|
||||
color: #2d6a88;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.content div div {
|
||||
padding-bottom: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
<div>
|
||||
<h1>HTTP 509 - Bandwidth Limit Exceeded</h1>
|
||||
<dl>
|
||||
<dt>错误说明:</dt>
|
||||
<dt>原因1:网站流量已经超出您所购买的方案限制即服务器达到带宽限制</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>1.升级方案 2.等到下个月后流量重新计算,网站即可正常浏览。</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,66 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>510 错误 - phpstudy</title>
|
||||
<meta content="" name="keywords">
|
||||
<meta content="" name="description">
|
||||
<meta content="webkit" name="renderer">
|
||||
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">
|
||||
<meta content="black" name="apple-mobile-web-app-status-bar-style">
|
||||
<meta content="yes" name="apple-mobile-web-app-capable">
|
||||
<meta content="telephone=no" name="format-detection">
|
||||
<meta CONTENT="no-cache" HTTP-EQUIV="pragma">
|
||||
<meta CONTENT="no-store, must-revalidate" HTTP-EQUIV="Cache-Control">
|
||||
<meta CONTENT="Wed, 26 Feb 1997 08:21:57 GMT" HTTP-EQUIV="expires">
|
||||
<meta CONTENT="0" HTTP-EQUIV="expires">
|
||||
<style>
|
||||
body {
|
||||
font: 16px arial, 'Microsoft Yahei', 'Hiragino Sans GB', sans-serif;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
color: #3a87ad;
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 45%;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
|
||||
.content > div {
|
||||
margin-top: 200px;
|
||||
padding: 20px;
|
||||
background: #d9edf7;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.content dl {
|
||||
color: #2d6a88;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.content div div {
|
||||
padding-bottom: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
<div>
|
||||
<h1>HTTP 510 - Not Extended</h1>
|
||||
<dl>
|
||||
<dt>错误说明:</dt>
|
||||
<dt>原因1:获取资源所需要的策略并没有被满足</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>需要请求有额外的扩展内容,服务器才能处理请求。</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
|
@ -0,0 +1,420 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta content="width=device-width, initial-scale=1.0" name="viewport">
|
||||
<title>SpringCloud微服务复习教程-Gateway模块</title>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap"
|
||||
rel="stylesheet">
|
||||
<style>
|
||||
:root {
|
||||
--primary-color: #6a11cb;
|
||||
--secondary-color: #2575fc;
|
||||
--accent-color: #ff5e62;
|
||||
--light-color: #f8f9fa;
|
||||
--dark-color: #343a40;
|
||||
--success-color: #28a745;
|
||||
--info-color: #17a2b8;
|
||||
--warning-color: #ffc107;
|
||||
--danger-color: #dc3545;
|
||||
}
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Noto Sans SC', 'Roboto', sans-serif;
|
||||
line-height: 1.6;
|
||||
color: #333;
|
||||
background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
header {
|
||||
background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
|
||||
color: white;
|
||||
padding: 2rem 0;
|
||||
text-align: center;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
header::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: -50%;
|
||||
left: -50%;
|
||||
width: 200%;
|
||||
height: 200%;
|
||||
background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
|
||||
transform: rotate(30deg);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
header h1 {
|
||||
font-size: 2.5rem;
|
||||
margin-bottom: 1rem;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
header p {
|
||||
font-size: 1.2rem;
|
||||
opacity: 0.9;
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
padding: 3rem 0;
|
||||
}
|
||||
|
||||
.card-container {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
||||
gap: 2rem;
|
||||
margin-top: 2rem;
|
||||
}
|
||||
|
||||
.card {
|
||||
background: white;
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
|
||||
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
||||
}
|
||||
|
||||
.card:hover {
|
||||
transform: translateY(-10px);
|
||||
box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.card-header {
|
||||
background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
|
||||
color: white;
|
||||
padding: 1.2rem;
|
||||
font-size: 1.2rem;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.card-body {
|
||||
padding: 1.5rem;
|
||||
}
|
||||
|
||||
.card-body ul {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
.card-body li {
|
||||
padding: 0.5rem 0;
|
||||
border-bottom: 1px solid #eee;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.card-body li:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.card-body li::before {
|
||||
content: "→";
|
||||
color: var(--secondary-color);
|
||||
margin-right: 0.5rem;
|
||||
}
|
||||
|
||||
.btn {
|
||||
display: inline-block;
|
||||
background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
|
||||
color: white;
|
||||
padding: 0.8rem 1.5rem;
|
||||
border-radius: 50px;
|
||||
text-decoration: none;
|
||||
font-weight: 500;
|
||||
margin-top: 1rem;
|
||||
transition: all 0.3s ease;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
box-shadow: 0 4px 10px rgba(106, 17, 203, 0.3);
|
||||
}
|
||||
|
||||
.btn:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 6px 15px rgba(106, 17, 203, 0.4);
|
||||
}
|
||||
|
||||
.btn-outline {
|
||||
background: transparent;
|
||||
border: 2px solid var(--primary-color);
|
||||
color: var(--primary-color);
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.btn-outline:hover {
|
||||
background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
|
||||
color: white;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
text-align: center;
|
||||
margin-bottom: 2rem;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.section-title h2 {
|
||||
font-size: 2rem;
|
||||
display: inline-block;
|
||||
padding-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.section-title h2::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 80px;
|
||||
height: 3px;
|
||||
background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
|
||||
}
|
||||
|
||||
footer {
|
||||
background: var(--dark-color);
|
||||
color: white;
|
||||
text-align: center;
|
||||
padding: 2rem 0;
|
||||
margin-top: 3rem;
|
||||
}
|
||||
|
||||
.features {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
gap: 2rem;
|
||||
margin: 3rem 0;
|
||||
}
|
||||
|
||||
.feature {
|
||||
flex: 1;
|
||||
min-width: 250px;
|
||||
max-width: 350px;
|
||||
text-align: center;
|
||||
padding: 2rem;
|
||||
background: rgba(255, 255, 255, 0.8);
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.feature:hover {
|
||||
background: white;
|
||||
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.feature-icon {
|
||||
font-size: 3rem;
|
||||
margin-bottom: 1rem;
|
||||
background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
|
||||
-webkit-background-clip: text;
|
||||
background-clip: text;
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
.feature h3 {
|
||||
margin-bottom: 1rem;
|
||||
color: var(--dark-color);
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
header h1 {
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
header p {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.card-container {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="container">
|
||||
<h1>SpringCloud微服务复习教程-Gateway模块</h1>
|
||||
<p>掌握微服务架构的核心概念与实践,从服务注册发现到分布式配置,全面复习SpringCloud生态系统的关键组件</p>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="main-content">
|
||||
<div class="container">
|
||||
<section class="features">
|
||||
<div class="feature">
|
||||
<div class="feature-icon">📚</div>
|
||||
<h3>系统化学习</h3>
|
||||
<p>从基础到高级,循序渐进掌握SpringCloud所有核心组件</p>
|
||||
</div>
|
||||
<div class="feature">
|
||||
<div class="feature-icon">💡</div>
|
||||
<h3>实战案例</h3>
|
||||
<p>通过实际项目案例,理解微服务架构的设计与实现</p>
|
||||
</div>
|
||||
<div class="feature">
|
||||
<div class="feature-icon">🔧</div>
|
||||
<h3>最佳实践</h3>
|
||||
<p>学习行业内的微服务最佳实践和常见问题解决方案</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<div class="section-title">
|
||||
<h2>核心组件教程</h2>
|
||||
</div>
|
||||
|
||||
<div class="card-container">
|
||||
<div class="card">
|
||||
<div class="card-header">Eureka - 服务注册与发现</div>
|
||||
<div class="card-body">
|
||||
<ul>
|
||||
<li>服务注册中心原理</li>
|
||||
<li>服务提供者注册</li>
|
||||
<li>服务消费者发现</li>
|
||||
<li>高可用Eureka集群</li>
|
||||
<li>自我保护机制</li>
|
||||
</ul>
|
||||
<a class="btn" href="#">开始学习</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">Ribbon - 客户端负载均衡</div>
|
||||
<div class="card-body">
|
||||
<ul>
|
||||
<li>负载均衡策略</li>
|
||||
<li>自定义负载规则</li>
|
||||
<li>与Eureka集成</li>
|
||||
<li>重试机制</li>
|
||||
<li>性能调优</li>
|
||||
</ul>
|
||||
<a class="btn" href="#">开始学习</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">Feign - 声明式服务调用</div>
|
||||
<div class="card-body">
|
||||
<ul>
|
||||
<li>接口式编程</li>
|
||||
<li>请求参数处理</li>
|
||||
<li>错误处理</li>
|
||||
<li>日志配置</li>
|
||||
<li>性能优化</li>
|
||||
</ul>
|
||||
<a class="btn" href="#">开始学习</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">Hystrix - 服务熔断</div>
|
||||
<div class="card-body">
|
||||
<ul>
|
||||
<li>服务降级</li>
|
||||
<li>熔断机制</li>
|
||||
<li>请求缓存</li>
|
||||
<li>请求合并</li>
|
||||
<li>Dashboard监控</li>
|
||||
</ul>
|
||||
<a class="btn" href="#">开始学习</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">Zuul/Gateway - API网关</div>
|
||||
<div class="card-body">
|
||||
<ul>
|
||||
<li>路由配置</li>
|
||||
<li>过滤器机制</li>
|
||||
<li>权限控制</li>
|
||||
<li>限流策略</li>
|
||||
<li>性能对比</li>
|
||||
</ul>
|
||||
<a class="btn" href="#">开始学习</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">Config - 分布式配置</div>
|
||||
<div class="card-body">
|
||||
<ul>
|
||||
<li>Git仓库配置</li>
|
||||
<li>配置加密</li>
|
||||
<li>动态刷新</li>
|
||||
<li>高可用配置</li>
|
||||
<li>与Bus集成</li>
|
||||
</ul>
|
||||
<a class="btn" href="#">开始学习</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">Sleuth/Zipkin - 链路追踪</div>
|
||||
<div class="card-body">
|
||||
<ul>
|
||||
<li>TraceID传播</li>
|
||||
<li>Span记录</li>
|
||||
<li>Zipkin集成</li>
|
||||
<li>性能分析</li>
|
||||
<li>日志关联</li>
|
||||
</ul>
|
||||
<a class="btn" href="#">开始学习</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">Security - 安全控制</div>
|
||||
<div class="card-body">
|
||||
<ul>
|
||||
<li>OAuth2集成</li>
|
||||
<li>JWT支持</li>
|
||||
<li>权限控制</li>
|
||||
<li>单点登录</li>
|
||||
<li>微服务安全</li>
|
||||
</ul>
|
||||
<a class="btn" href="#">开始学习</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section style="margin-top: 4rem;">
|
||||
<div class="section-title">
|
||||
<h2>实践项目</h2>
|
||||
</div>
|
||||
|
||||
<div style="text-align: center; max-width: 800px; margin: 0 auto;">
|
||||
<p style="margin-bottom: 2rem;">通过实际项目整合所有SpringCloud组件,构建完整的微服务架构解决方案</p>
|
||||
<a class="btn btn-outline" href="#">查看项目案例</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<p>© 2023 SpringCloud微服务复习教程 | 设计用于学习目的</p>
|
||||
<p style="margin-top: 1rem; opacity: 0.8;">使用HTML5, CSS3和响应式设计构建</p>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
|
@ -17,10 +17,12 @@
|
|||
<modules>
|
||||
<module>services</module>
|
||||
<module>model</module>
|
||||
<module>gateway</module>
|
||||
</modules>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<java.version>17</java.version>
|
||||
<junit.version>3.8.1</junit.version>
|
||||
<knife4j.version>4.5.0</knife4j.version>
|
||||
|
|
|
@ -86,15 +86,5 @@
|
|||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<!-- <dependency> -->
|
||||
<!-- <groupId>org.springdoc</groupId> -->
|
||||
<!-- <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId> -->
|
||||
<!-- <version>2.8.6</version> -->
|
||||
<!-- </dependency> -->
|
||||
<!-- <dependency> -->
|
||||
<!-- <groupId>io.swagger</groupId> -->
|
||||
<!-- <artifactId>swagger-annotations</artifactId> -->
|
||||
<!-- <version>1.6.14</version> -->
|
||||
<!-- </dependency> -->
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
Loading…
Reference in New Issue