feat: support tsf gw.

pull/1697/head
Haotian Zhang 3 weeks ago
parent bec1f383e0
commit 079ac0a16c

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<parent>
<artifactId>tsf-example</artifactId>
<groupId>com.tencent.cloud</groupId>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>msgw-scg</artifactId>
<dependencies>
<dependency>
<groupId>com.tencent.cloud</groupId>
<artifactId>spring-cloud-starter-tencent-all</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-gateway</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bootstrap</artifactId>
</dependency>
</dependencies>
</project>

@ -0,0 +1,34 @@
/*
* Tencent is pleased to support the open source community by making spring-cloud-tencent available.
*
* Copyright (C) 2021 Tencent. All rights reserved.
*
* Licensed under the BSD 3-Clause License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://opensource.org/licenses/BSD-3-Clause
*
* Unless required by applicable law or agreed to in writing, software distributed
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package com.tencent.cloud.tsf.msgw.scg;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.tsf.annotation.EnableTsf;
/**
* @author seanlxliu
*/
@SpringBootApplication
@EnableTsf
public class ScgApplication {
public static void main(String[] args) {
SpringApplication.run(ScgApplication.class, args);
}
}

@ -0,0 +1,28 @@
server:
port: 8080
error:
include-exception: true
spring:
application:
name: msgw-scg
cloud:
gateway:
discovery:
locator:
enabled: true
lower-case-service-id: false
httpclient:
# The connect timeout in millis, the default is 45s.
connectTimeout: 200
responseTimeout: 10s
consul:
enabled: true
scheme: HTTP
logging:
level:
root: INFO
file:
name: /tsf-demo-logs/${spring.application.name}/root.log
pattern:
level: "%-5level [${spring.application.name},%mdc{trace_id},%mdc{span_id},]"

@ -17,5 +17,6 @@
<module>provider-demo</module>
<module>consumer-demo-retry</module>
<module>consumer-demo</module>
<module>msgw-scg</module>
</modules>
</project>

Loading…
Cancel
Save