chore(init): Scaffold video platform microservices
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
package com.nuaa.video.gateway;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
|
||||
@SpringBootApplication
|
||||
@EnableDiscoveryClient
|
||||
public class GatewayApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(GatewayApplication.class, args);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
server:
|
||||
port: 9000
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: video-gateway
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: 127.0.0.1:8848
|
||||
namespace: public
|
||||
group: DEFAULT_GROUP
|
||||
gateway:
|
||||
discovery:
|
||||
locator:
|
||||
enabled: true
|
||||
lower-case-service-id: true
|
||||
routes:
|
||||
- id: video-auth
|
||||
uri: lb://video-auth
|
||||
predicates:
|
||||
- Path=/auth/**
|
||||
filters:
|
||||
- StripPrefix=1
|
||||
- id: video-user
|
||||
uri: lb://video-user
|
||||
predicates:
|
||||
- Path=/user/**
|
||||
filters:
|
||||
- StripPrefix=1
|
||||
- id: video-content
|
||||
uri: lb://video-content
|
||||
predicates:
|
||||
- Path=/content/**
|
||||
filters:
|
||||
- StripPrefix=1
|
||||
- id: video-comment
|
||||
uri: lb://video-comment
|
||||
predicates:
|
||||
- Path=/comment/**
|
||||
filters:
|
||||
- StripPrefix=1
|
||||
- id: video-recommend
|
||||
uri: lb://video-recommend
|
||||
predicates:
|
||||
- Path=/recommend/**
|
||||
filters:
|
||||
- StripPrefix=1
|
||||
- id: video-admin
|
||||
uri: lb://video-admin
|
||||
predicates:
|
||||
- Path=/admin/**
|
||||
filters:
|
||||
- StripPrefix=1
|
||||
sentinel:
|
||||
transport:
|
||||
dashboard: localhost:8080
|
||||
port: 8719
|
||||
eager: true
|
||||
scg:
|
||||
fallback:
|
||||
mode: response
|
||||
response-body: '{"code":500,"message":"服务不可用,请稍后再试"}'
|
||||
|
||||
management:
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: '*'
|
||||
Reference in New Issue
Block a user