Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
M
MicroServices
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mohammad.salama
MicroServices
Commits
ff12db53
Commit
ff12db53
authored
Apr 27, 2024
by
mohammad.salama
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Services Are Working And Registering , But GateWay NOT WORKING
parent
0e45f7d5
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
164 additions
and
13 deletions
+164
-13
compiler.xml
MicroServices/.idea/compiler.xml
+1
-0
pom.xml
MicroServices/CloudGateway/pom.xml
+82
-5
CloudGatewayApplication.java
...ay/src/main/java/org/example/CloudGatewayApplication.java
+15
-0
Main.java
...Services/CloudGateway/src/main/java/org/example/Main.java
+0
-7
application.properties
...es/CloudGateway/src/main/resources/application.properties
+0
-0
application.yml
...oServices/CloudGateway/src/main/resources/application.yml
+33
-0
application.properties
...rvices/CloudGateway/target/classes/application.properties
+0
-0
application.yml
MicroServices/CloudGateway/target/classes/application.yml
+33
-0
CloudGatewayApplication.class
.../target/classes/org/example/CloudGatewayApplication.class
+0
-0
Main.class
...rvices/CloudGateway/target/classes/org/example/Main.class
+0
-0
WeatherServiceApp.java
...rService/src/main/java/org/example/WeatherServiceApp.java
+0
-1
WeatherServiceApp.class
...ervice/target/classes/org/example/WeatherServiceApp.class
+0
-0
No files found.
MicroServices/.idea/compiler.xml
View file @
ff12db53
...
...
@@ -20,6 +20,7 @@
</component>
<component
name=
"JavacSettings"
>
<option
name=
"ADDITIONAL_OPTIONS_OVERRIDE"
>
<module
name=
"CloudGateway"
options=
"-parameters"
/>
<module
name=
"DataBase"
options=
"-parameters"
/>
<module
name=
"DiscAndReg"
options=
"-parameters"
/>
<module
name=
"UserService"
options=
"-parameters"
/>
...
...
MicroServices/CloudGateway/pom.xml
View file @
ff12db53
...
...
@@ -3,18 +3,95 @@
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<parent>
<artifactId>
MicroServices
</artifactId>
<groupId>
org.example
</groupId>
<version>
0.0.1-SNAPSHOT
</version>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-parent
</artifactId>
<version>
3.0.1
</version>
<relativePath/>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
org.example
</groupId>
<artifactId>
CloudGateway
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
<name>
CloudGateway
</name>
<properties>
<maven.compiler.source>
17
</maven.compiler.source>
<maven.compiler.target>
17
</maven.compiler.target>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<java.version>
17
</java.version>
<spring-cloud.version>
2022.0.0
</spring-cloud.version>
</properties>
<dependencies>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-actuator
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-gateway
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-netflix-eureka-client
</artifactId>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-dependencies
</artifactId>
<version>
${spring-cloud.version}
</version>
<type>
pom
</type>
<scope>
import
</scope>
</dependency>
<dependency>
<groupId>
org.slf4j
</groupId>
<artifactId>
slf4j-api
</artifactId>
<version>
2.0.9
</version>
</dependency>
<dependency>
<groupId>
ch.qos.logback
</groupId>
<artifactId>
logback-classic
</artifactId>
<version>
1.4.11
</version>
</dependency>
<dependency>
<groupId>
ch.qos.logback
</groupId>
<artifactId>
logback-core
</artifactId>
<version>
1.4.11
</version>
</dependency>
<dependency>
<groupId>
com.google.code.gson
</groupId>
<artifactId>
gson
</artifactId>
<version>
2.8.9
</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>
netflix-candidates
</id>
<name>
Netflix Candidates
</name>
<url>
https://artifactory-oss.prod.netflix.net/artifactory/maven-oss-candidates
</url>
<snapshots>
<enabled>
false
</enabled>
</snapshots>
</repository>
</repositories>
</project>
\ No newline at end of file
MicroServices/CloudGateway/src/main/java/org/example/CloudGatewayApplication.java
0 → 100644
View file @
ff12db53
package
org
.
example
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
@SpringBootApplication
@EnableDiscoveryClient
public
class
CloudGatewayApplication
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
CloudGatewayApplication
.
class
,
args
);
}
}
\ No newline at end of file
MicroServices/CloudGateway/src/main/java/org/example/Main.java
deleted
100644 → 0
View file @
0e45f7d5
package
org
.
example
;
public
class
Main
{
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
"Hello world!"
);
}
}
\ No newline at end of file
MicroServices/CloudGateway/src/main/resources/application.properties
0 → 100644
View file @
ff12db53
MicroServices/CloudGateway/src/main/resources/application.yml
0 → 100644
View file @
ff12db53
server
:
port
:
9090
spring
:
application
:
name
:
gateway-service
cloud
:
gateway
:
routes
:
-
id
:
DataBase
uri
:
lb://database-service
predicates
:
-
Path=/users-db/**
-
Path=/flights-db/**
-
id
:
UserService
uri
:
lb://user-service
predicates
:
-
Path=/users/**
-
id
:
WeatherService
uri
:
lb://weather-service
predicates
:
-
Path=/weather/**
eureka
:
client
:
register-with-eureka
:
true
fetch-registry
:
true
service-url
:
default-zone
:
http://localhost:8761/eureka/
# instance:
# hostname: localhost
# preferIpAddress: true
\ No newline at end of file
MicroServices/CloudGateway/target/classes/application.properties
0 → 100644
View file @
ff12db53
MicroServices/CloudGateway/target/classes/application.yml
0 → 100644
View file @
ff12db53
server
:
port
:
9090
spring
:
application
:
name
:
gateway-service
cloud
:
gateway
:
routes
:
-
id
:
DataBase
uri
:
lb://database-service
predicates
:
-
Path=/users-db/**
-
Path=/flights-db/**
-
id
:
UserService
uri
:
lb://user-service
predicates
:
-
Path=/users/**
-
id
:
WeatherService
uri
:
lb://weather-service
predicates
:
-
Path=/weather/**
eureka
:
client
:
register-with-eureka
:
true
fetch-registry
:
true
service-url
:
default-zone
:
http://localhost:8761/eureka/
# instance:
# hostname: localhost
# preferIpAddress: true
\ No newline at end of file
MicroServices/CloudGateway/target/classes/org/example/CloudGatewayApplication.class
0 → 100644
View file @
ff12db53
File added
MicroServices/CloudGateway/target/classes/org/example/Main.class
deleted
100644 → 0
View file @
0e45f7d5
File deleted
MicroServices/WeatherService/src/main/java/org/example/WeatherServiceApp.java
View file @
ff12db53
...
...
@@ -16,7 +16,6 @@ public class WeatherServiceApp
SpringApplication
.
run
(
WeatherServiceApp
.
class
,
args
);
}
//@LoadBalanced
@Bean
@LoadBalanced
public
RestTemplate
getRestTemplate
()
...
...
MicroServices/WeatherService/target/classes/org/example/WeatherServiceApp.class
View file @
ff12db53
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment