Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yml file changes #3

Merged
merged 4 commits into from
Dec 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Java CI with Maven (Order-management)

on:
push:
branches: [ "action_build" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest

steps:
# Step 1: Checkout the repository
- uses: actions/checkout@v4

# Step 2: Set up JDK 17
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven

# Step 3: Debug - List directory contents (Optional)
- name: List directory contents
run: ls -R

# Step 4: Build the Maven project starting from the parent POM
- name: Build Order-management Maven project
run: mvn -B clean install

# Optional: Update dependency graph for Dependabot
- name: Update dependency graph
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
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
Loading