parent
4ae6463612
commit
3be6c0f4fa
@ -1,7 +1,8 @@ |
|||||||
* 文档目录 |
* 文档目录 |
||||||
|
|
||||||
* [快速体验](files/1001_快速体验.md?t=1553426189495) |
* [快速体验](files/10010_快速体验.md?t=1553485733133) |
||||||
* [新增接口](files/1002_新增接口.md?t=1553426189514) |
* [项目接入到SOP](files/10011_项目接入到SOP.md?t=1553485733154) |
||||||
* [业务参数校验](files/1003_业务参数校验.md?t=1553426189514) |
* [新增接口](files/10020_新增接口.md?t=1553485733154) |
||||||
* [错误处理](files/1004_错误处理.md?t=1553426189515) |
* [业务参数校验](files/10030_业务参数校验.md?t=1553485733154) |
||||||
* [接口交互详解](files/1005_接口交互详解.md?t=1553426189515) |
* [错误处理](files/10040_错误处理.md?t=1553485733154) |
||||||
|
* [接口交互详解](files/10050_接口交互详解.md?t=1553485733155) |
||||||
|
@ -0,0 +1,41 @@ |
|||||||
|
# 项目接入到SOP |
||||||
|
|
||||||
|
以springboot项目为例,springmvc目前暂不支持,以后可以支持。 |
||||||
|
|
||||||
|
- 工程依赖sop-service-common,和eureka |
||||||
|
|
||||||
|
```xml |
||||||
|
<dependency> |
||||||
|
<groupId>com.gitee.sop</groupId> |
||||||
|
<artifactId>sop-service-common</artifactId> |
||||||
|
<version>1.0.0-SNAPSHOT</version> |
||||||
|
</dependency> |
||||||
|
|
||||||
|
<dependency> |
||||||
|
<groupId>org.springframework.cloud</groupId> |
||||||
|
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId> |
||||||
|
</dependency> |
||||||
|
``` |
||||||
|
|
||||||
|
- 配置文件添加eureka配置 |
||||||
|
|
||||||
|
```yaml |
||||||
|
eureka: |
||||||
|
port: 1111 # eureka端口号 |
||||||
|
host: localhost # eureka地址 |
||||||
|
client: |
||||||
|
serviceUrl: |
||||||
|
defaultZone: http://${eureka.host}:${eureka.port}/eureka/ |
||||||
|
``` |
||||||
|
|
||||||
|
- 在springboot启动类上添加`@EnableDiscoveryClient` |
||||||
|
- 新增一个配置类,继承`AlipayServiceConfiguration.java`,内容为空 |
||||||
|
|
||||||
|
```java |
||||||
|
@Configuration |
||||||
|
public class OpenServiceConfig extends AlipayServiceConfiguration { |
||||||
|
|
||||||
|
} |
||||||
|
``` |
||||||
|
|
||||||
|
到此准备工作就完成了,接下来可前往`新增接口`查看如何新增接口。 |
Loading…
Reference in new issue