You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
SOP/doc/docs/files/10010_快速体验.md

49 lines
1.9 KiB

6 years ago
# 快速体验
5 years ago
> 运行环境:JDK8,Maven3,[Nacos](https://nacos.io/zh-cn/docs/what-is-nacos.html),Mysql
6 years ago
5 years ago
- 安装并启动Nacos,[安装教程](https://nacos.io/zh-cn/docs/quick-start.html)
5 years ago
- 执行Mysql脚本`sop.sql`(Mysql版本5.6+),5.6以下运行`sop-mysql5.6以下版本.sql`
- IDE安装lombok插件,然后打开项目(IDEA下可以打开根pom.xml,然后open as project)
5 years ago
- 启动网关:打开sop-gateway下的`application-dev.properties`
1. 修改数据库`username/password`
5 years ago
2. 指定nacos地址,如果nacos安装在本机则不用改
5 years ago
3. 运行`SopGatewayApplication.java`
5 years ago
- 启动微服务:打开`sop-example/sop-story/sop-story-web`下的`application-dev.properties`文件
5 years ago
1. 指定nacos地址,如果nacos安装在本机则不用改
5 years ago
2. 运行`SopStoryApplication.java`
5 years ago
- 找到sop-test,打开`AllInOneTest.java`进行接口调用测试
6 years ago
## 使用admin
5 years ago
- 找到`sop-admin/sop-admin-server`工程,打开sop-admin-server下的`application-dev.properties`,修改相关配置
5 years ago
- 运行`SopAdminServerApplication.java`
6 years ago
- 访问:`http://localhost:8082`
6 years ago
登录账号:admin/123456
5 years ago
## 启动文档中心
文档中心代码在sop-website工程中
- 确保注册中心、网关、微服务正常启动
- 修改sop-website下的application-dev.properties相关配置
- 运行WebsiteServerApplication.java
- 访问http://localhost:8083
6 years ago
5 years ago
## 基本配置
在`sop-gateway`下的application-dev.properties配置,各项配置说明如下
```properties
# 忽略验证,设置true,则所有接口不会进行签名校验,默认false
sop.api-config.ignore-validate=false
# 是否对结果进行合并,默认true
sop.api-config.merge-result=true
# 显示返回sign,默认true
sop.api-config.show-return-sign=true
# 是否开启限流功能,默认true
sop.api-config.open-limit=true
# 请求超时时间,默认5分钟,即允许在5分钟内重复请求,默认300
sop.api-config.timeout-seconds=300
```