Skip to content

Commit

Permalink
project yml is updated
Browse files Browse the repository at this point in the history
  • Loading branch information
LSING46 authored and LSING46 committed Dec 7, 2024
1 parent 2092346 commit 27ff03d
Show file tree
Hide file tree
Showing 24 changed files with 580 additions and 88 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Java CI with Maven (User Service)
name: Java CI with Maven

on:
push:
Expand Down
7 changes: 7 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 40 additions & 0 deletions bag-service/src/main/resources/application-local.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
server:
port: 8084

spring:
application:
name: bag-service
config:
activate:
on-profile: local
import: "optional:configserver:"
# config:
# enabled: true
cloud:
bus:
enabled: false

# Configure the message broker connection (RabbitMQ or Kafka)
# cloud:
# config:
# uri: http://${CONFIG_SERVER_SERVICE_SERVICE_HOST:localhost}:8085
# bus:
# enabled: true
# refresh:
# enabled: true
# trace:
# enabled: true
# rabbitmq:
# addresses: ${RABBITMQ_SERVICE_SERVICE_HOST:localhost}
eureka:
client:
register-with-eureka: true
fetch-registry: true
serviceUrl:
defaultZone: ${EUREKA_URI:http://localhost:8761/eureka} #eureka endpoint
healthcheck:
enabled: true
instance:
leaseRenewalIntervalInSeconds: 1
leaseExpirationDurationInSeconds: 2
hostname: localhost
37 changes: 21 additions & 16 deletions bag-service/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,24 @@ server:
port: 8084

spring:
config:
import: configserver:http://localhost:8085
#eureka:
# client:
# register-with-eureka: true
# fetch-registry: true
# serviceUrl:
# defaultZone: http://localhost:8761/eureka #eureka endpoint
#
# healthcheck:
# enabled: true
#
# instance:
# leaseRenewalIntervalInSeconds: 1
# leaseExpirationDurationInSeconds: 2
# hostname: localhost
profiles:
active: local
application:
name: bag-service
# config:
# import: configserver:http://localhost:8085

eureka:
client:
register-with-eureka: true
fetch-registry: true
serviceUrl:
defaultZone: http://localhost:8761/eureka #eureka endpoint

healthcheck:
enabled: true

instance:
leaseRenewalIntervalInSeconds: 1
leaseExpirationDurationInSeconds: 2
hostname: localhost
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.cloud.bus.event.RefreshRemoteApplicationEvent;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.cloud.context.scope.refresh.RefreshScopeRefreshedEvent;
import org.springframework.context.annotation.Bean;
import org.springframework.context.event.EventListener;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@SpringBootApplication
public class ConfigClientServiceApplication {
Expand All @@ -27,7 +29,7 @@ ApplicationRunner runner() {
}
}

@Controller
@RestController
@ResponseBody
@RequiredArgsConstructor
//@RefreshScope
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.config.server.EnableConfigServer;

@SpringBootApplication
@EnableConfigServer
@EnableDiscoveryClient
public class ConfigServerApplication {

public static void main(String[] args) {
Expand Down
58 changes: 58 additions & 0 deletions config-server/src/main/resources/application-local.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
server:
port: 8085

spring:
application:
name: config-service
config:
activate:
on-profile: local
cloud:
config:
server:
git:
uri: https://github.com/Lokesh598/order-management-spring-cloud-config
default-label: main
clone-on-start: true
monitor:
enabled: true
bus:
enabled: false
stream:
kafka:
binder:
brokers: localhost:9092
bindings:
output:
destination: config-server

management:
endpoints:
web:
exposure:
include: "*"

# Configure the message broker connection (RabbitMQ or Kafka)
# cloud:
# config:
# uri: http://${CONFIG_SERVER_SERVICE_SERVICE_HOST:localhost}:8085
# bus:
# enabled: true
# refresh:
# enabled: true
# trace:
# enabled: true
# rabbitmq:
# addresses: ${RABBITMQ_SERVICE_SERVICE_HOST:localhost}
eureka:
client:
register-with-eureka: true
fetch-registry: true
serviceUrl:
defaultZone: ${EUREKA_URI:http://localhost:8761/eureka} #eureka endpoint
healthcheck:
enabled: true
instance:
leaseRenewalIntervalInSeconds: 1
leaseExpirationDurationInSeconds: 2
hostname: localhost
26 changes: 14 additions & 12 deletions config-server/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ server:
port: 8085

spring:
profiles:
active: local
application:
name: config-server

Expand All @@ -16,16 +18,16 @@ spring:
enabled: true
bus:
enabled: true
# stream:
# kafka:
# binder:
# brokers: localhost:9092
# bindings:
# output:
# destination: config-server
stream:
kafka:
binder:
brokers: localhost:9092
bindings:
output:
destination: config-server

#management:
# endpoints:
# web:
# exposure:
# include: "*"
management:
endpoints:
web:
exposure:
include: "*"
40 changes: 40 additions & 0 deletions eureka-server/src/main/resources/application-local.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#server:
# port: 8082

#spring:
# application:
# name: eureka-service
# config:
# activate:
# on-profile: local
# import: "optional:configserver:"
## config:
## enabled: true
# cloud:
# bus:
# enabled: false

# Configure the message broker connection (RabbitMQ or Kafka)
# cloud:
# config:
# uri: http://${CONFIG_SERVER_SERVICE_SERVICE_HOST:localhost}:8085
# bus:
# enabled: true
# refresh:
# enabled: true
# trace:
# enabled: true
# rabbitmq:
# addresses: ${RABBITMQ_SERVICE_SERVICE_HOST:localhost}
#eureka:
# client:
# register-with-eureka: true
# fetch-registry: true
# serviceUrl:
# defaultZone: ${EUREKA_URI:http://localhost:8761/eureka} #eureka endpoint
# healthcheck:
# enabled: true
# instance:
# leaseRenewalIntervalInSeconds: 1
# leaseExpirationDurationInSeconds: 2
# hostname: localhost
11 changes: 7 additions & 4 deletions eureka-server/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@ eureka:
register-with-eureka: false
fetch-registry: false

#
#server:
# port: 8761

server:
port: 8767
port: 8761


#server:
# port: 8767

spring:
profiles:
active: local
application:
name: registry
Loading

0 comments on commit 27ff03d

Please sign in to comment.