finish 4th practical
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
plugins {
|
||||
id("java")
|
||||
alias(libs.plugins.spring.boot)
|
||||
}
|
||||
|
||||
group = "ua.com.dxrkness"
|
||||
version = "1.0-SNAPSHOT"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// spring
|
||||
implementation(platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES))
|
||||
implementation(platform(libs.spring.cloud.dependencies))
|
||||
implementation("org.springframework.cloud:spring-cloud-starter-gateway-server-webflux")
|
||||
implementation("org.springframework.cloud:spring-cloud-starter-netflix-eureka-client")
|
||||
implementation("org.springframework.cloud:spring-cloud-starter-loadbalancer")
|
||||
}
|
||||
|
||||
tasks.test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package ua.com.dxrkness.gateway;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class ApiGatewayApplication {
|
||||
static void main(String[] args) {
|
||||
SpringApplication.run(ApiGatewayApplication.class, args);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
server:
|
||||
port: 8079
|
||||
spring:
|
||||
cloud:
|
||||
gateway:
|
||||
server:
|
||||
webflux:
|
||||
discovery:
|
||||
locator:
|
||||
enabled: true
|
||||
lower-case-service-id: true
|
||||
application:
|
||||
name: api-gateway
|
||||
eureka:
|
||||
client:
|
||||
service-url:
|
||||
defaultZone: http://localhost:8070/eureka
|
||||
register-with-eureka: false
|
||||
Reference in New Issue
Block a user