Skip to content

Commit cdeb74a

Browse files
committed
Task 41 : Define Config Server with its properties files for all services, API Gateway and Eureka server
1 parent 6aba5bc commit cdeb74a

File tree

27 files changed

+795
-130
lines changed

27 files changed

+795
-130
lines changed

Diff for: .idea/compiler.xml

+4-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: .idea/encodings.xml

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: .idea/misc.xml

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,2 @@
1-
spring.datasource.url=jdbc:mysql://localhost:3306/springbootadvertisement?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Turkey
2-
spring.datasource.username=springmicroserviceuser
3-
spring.datasource.password=111111
4-
5-
# Define hibernate settings (JPA / Hibernate properties)
6-
spring.jpa.hibernate.ddl-auto=update
7-
spring.jpa.show-sql=true
8-
spring.jpa.properties.hibernate.format_sql=true
9-
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect
10-
11-
server.port=9001
12-
13-
spring.application.name=advertisement-service
14-
eureka.client.serviceUrl.defaultZone=http://localhost:8761/eureka
15-
16-
keycloak.realm=master
17-
keycloak.auth-server-url=http://localhost:8181
18-
keycloak.ssl-required=external
19-
keycloak.resource=spring-boot-microservice-keycloak
20-
keycloak.bearer-only=true
21-
keycloak.public-client=true
22-
23-
# Messaging Properties
24-
queue.name=queue-advertisement
25-
spring.rabbitmq.template.exchange=adv-exchange
26-
spring.rabbitmq.template.routing-key=adv-routing
27-
spring.rabbitmq.host=localhost
28-
spring.rabbitmq.port=5672
29-
spring.rabbitmq.username=rabbitmq
30-
spring.rabbitmq.password=123456
31-
32-
spring.main.allow-bean-definition-overriding=true
1+
spring.config.import=optional:configserver:http://localhost:9191/
2+
spring.application.name=advertisement-service
+1-24
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,2 @@
1-
eureka.client.serviceUrl.defaultZone=http://localhost:8761/eureka
21
spring.application.name=api-gateway
3-
4-
## User Service Route
5-
spring.cloud.gateway.routes[0].id=user-service
6-
spring.cloud.gateway.routes[0].uri=lb://user-service
7-
spring.cloud.gateway.routes[0].predicates[0]=Path=/api/**
8-
9-
## Advertisement Service Route
10-
spring.cloud.gateway.routes[1].id=advertisement-service
11-
spring.cloud.gateway.routes[1].uri=lb://advertisement-service
12-
spring.cloud.gateway.routes[1].predicates[0]=Path=/api/**
13-
14-
## Management Service Route
15-
spring.cloud.gateway.routes[2].id=management-service
16-
spring.cloud.gateway.routes[2].uri=lb://management-service
17-
spring.cloud.gateway.routes[2].predicates[0]=Path=/api/**
18-
19-
## Report Service Route
20-
spring.cloud.gateway.routes[3].id=report-service
21-
spring.cloud.gateway.routes[3].uri=lb://report-service
22-
spring.cloud.gateway.routes[3].predicates[0]=Path=/api/**
23-
24-
25-
#spring.security.oauth2.resourceserver.jwt.issuer-uri=http://localhost:8181/auth/realms/master
2+
spring.config.import=optional:configserver:http://localhost:9191/

Diff for: configserver/.gitignore

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
HELP.md
2+
target/
3+
!.mvn/wrapper/maven-wrapper.jar
4+
!**/src/main/**/target/
5+
!**/src/test/**/target/
6+
7+
### STS ###
8+
.apt_generated
9+
.classpath
10+
.factorypath
11+
.project
12+
.settings
13+
.springBeans
14+
.sts4-cache
15+
16+
### IntelliJ IDEA ###
17+
.idea
18+
*.iws
19+
*.iml
20+
*.ipr
21+
22+
### NetBeans ###
23+
/nbproject/private/
24+
/nbbuild/
25+
/dist/
26+
/nbdist/
27+
/.nb-gradle/
28+
build/
29+
!**/src/main/**/build/
30+
!**/src/test/**/build/
31+
32+
### VS Code ###
33+
.vscode/

Diff for: configserver/.mvn/wrapper/maven-wrapper.jar

57.4 KB
Binary file not shown.

Diff for: configserver/.mvn/wrapper/maven-wrapper.properties

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.6/apache-maven-3.8.6-bin.zip
2+
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar

Diff for: configserver/Dockerfile

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM openjdk:11 AS build
2+
3+
COPY pom.xml mvnw ./
4+
RUN chmod +x mvnw
5+
COPY .mvn .mvn
6+
RUN ./mvnw dependency:resolve
7+
8+
COPY src src
9+
RUN ./mvnw package -Dmaven.test.skip
10+
11+
# For Java 11,
12+
FROM adoptopenjdk/openjdk11:alpine-jre
13+
14+
WORKDIR configserver
15+
16+
COPY --from=build target/*.jar configserver.jar
17+
18+
ENTRYPOINT ["java","-jar","configserver.jar"]

0 commit comments

Comments
 (0)