configure discovery and resource servers
This commit is contained in:
parent
663951d8eb
commit
4c0a72d6e7
|
@ -1,5 +1,5 @@
|
||||||
spring.application.name=resource
|
spring.application.name=resource
|
||||||
server.port=0
|
#server.port=0
|
||||||
|
|
||||||
#### cloud
|
#### cloud
|
||||||
eureka.client.serviceUrl.defaultZone=${EUREKA_URI:http://system:systemPass@localhost:8761/eureka}
|
eureka.client.serviceUrl.defaultZone=${EUREKA_URI:http://system:systemPass@localhost:8761/eureka}
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
spring.cloud.config.name=resource
|
spring.cloud.config.name=resource
|
||||||
spring.cloud.config.discovery.service-id=config
|
spring.cloud.config.discovery.service-id=config
|
||||||
spring.cloud.config.discovery.enabled=true
|
spring.cloud.config.discovery.enabled=true
|
||||||
|
eureka.client.serviceUrl.defaultZone=http://system:systemPass@localhost:8761/eureka
|
||||||
|
|
||||||
|
server.port=8086
|
|
@ -1,19 +0,0 @@
|
||||||
#### cloud
|
|
||||||
spring.application.name=spring-cloud-eureka-client
|
|
||||||
server.port=0
|
|
||||||
eureka.client.serviceUrl.defaultZone=http://system:systemPass@localhost:8761/eureka
|
|
||||||
eureka.instance.preferIpAddress=true
|
|
||||||
|
|
||||||
#### persistence
|
|
||||||
spring.datasource.driver-class-name=org.h2.Driver
|
|
||||||
spring.datasource.url=jdbc:h2:mem:cloud_rest;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
|
|
||||||
spring.datasource.username=sa
|
|
||||||
spring.datasource.password=
|
|
||||||
|
|
||||||
#### security
|
|
||||||
security.basic.enabled=true
|
|
||||||
security.basic.path=/**
|
|
||||||
security.user.name=user
|
|
||||||
security.user.password=userPass
|
|
||||||
security.user.role=USER
|
|
||||||
security.sessions=always
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
spring.cloud.config.name=resource
|
||||||
|
spring.cloud.config.discovery.service-id=config
|
||||||
|
spring.cloud.config.discovery.enabled=true
|
||||||
|
eureka.client.serviceUrl.defaultZone=http://system:systemPass@localhost:8761/eureka
|
||||||
|
|
||||||
|
server.port=8085
|
|
@ -3,10 +3,11 @@ package org.baeldung;
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.cloud.config.server.EnableConfigServer;
|
import org.springframework.cloud.config.server.EnableConfigServer;
|
||||||
|
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
|
||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
@EnableConfigServer
|
@EnableConfigServer
|
||||||
// @EnableEurekaClient
|
@EnableEurekaClient
|
||||||
public class SpringCloudRestConfigApplication {
|
public class SpringCloudRestConfigApplication {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
server.port=8081
|
server.port=8081
|
||||||
spring.application.name=config
|
spring.application.name=config
|
||||||
|
|
||||||
spring.cloud.config.server.git.uri=https://github.com/eugenp/tutorials/tree/master/spring-cloud/spring-cloud-rest/application-config
|
spring.cloud.config.server.git.uri=${HOME}/application-config
|
||||||
|
|
||||||
#eureka.client.region = default
|
eureka.client.region = default
|
||||||
#eureka.client.registryFetchIntervalSeconds = 5
|
eureka.client.registryFetchIntervalSeconds = 5
|
||||||
#eureka.client.serviceUrl.defaultZone=${EUREKA_URI:http://system:systemPass@localhost:8761/eureka}
|
eureka.client.serviceUrl.defaultZone=${EUREKA_URI:http://system:systemPass@localhost:8761/eureka}
|
||||||
|
|
Loading…
Reference in New Issue