Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
M
Micro_Services
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
ali.saeed
Micro_Services
Commits
c7223662
Commit
c7223662
authored
Apr 26, 2024
by
Ali Saeed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Converted Services to Euerka Clients
parent
844a9c03
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
62 additions
and
4 deletions
+62
-4
pom.xml
invoicing-service/pom.xml
+26
-1
InvoicingServiceApplication.java
...rc/main/java/org/example/InvoicingServiceApplication.java
+2
-1
application.properties
invoicing-service/src/main/resources/application.properties
+3
-1
pom.xml
users-service/pom.xml
+26
-0
UsersServiceApplication.java
...ce/src/main/java/org/example/UsersServiceApplication.java
+2
-0
application.properties
users-service/src/main/resources/application.properties
+3
-1
No files found.
invoicing-service/pom.xml
View file @
c7223662
...
...
@@ -14,24 +14,39 @@
<maven.compiler.source>
17
</maven.compiler.source>
<maven.compiler.target>
17
</maven.compiler.target>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<spring-cloud.version>
2022.0.4
</spring-cloud.version>
</properties>
<dependencies>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</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>
<dependency>
<groupId>
com.google.code.gson
</groupId>
<artifactId>
gson
</artifactId>
<version>
2.8.9
</version>
</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>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
...
...
@@ -40,4 +55,14 @@
</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>
invoicing-service/src/main/java/org/example/InvoicingServiceApplication.java
View file @
c7223662
...
...
@@ -2,9 +2,10 @@ 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
InvoicingServiceApplication
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
InvoicingServiceApplication
.
class
,
args
);
...
...
invoicing-service/src/main/resources/application.properties
View file @
c7223662
server.port
=
8081
\ No newline at end of file
spring.application.name
=
invoicing-service
server.port
=
8081
eureka.client.serviceUrl.defaultZone
=
${EUREKA_URL:http://localhost:8761/eureka/}
\ No newline at end of file
users-service/pom.xml
View file @
c7223662
...
...
@@ -16,6 +16,7 @@
<maven.compiler.source>
17
</maven.compiler.source>
<maven.compiler.target>
17
</maven.compiler.target>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<spring-cloud.version>
2022.0.4
</spring-cloud.version>
</properties>
<dependencies>
...
...
@@ -29,7 +30,22 @@
<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>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
...
...
@@ -38,6 +54,16 @@
</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>
...
...
users-service/src/main/java/org/example/UsersServiceApplication.java
View file @
c7223662
...
...
@@ -4,8 +4,10 @@ import org.springframework.boot.SpringApplication;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
@SpringBootApplication
@EnableDiscoveryClient
public
class
UsersServiceApplication
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
UsersServiceApplication
.
class
,
args
);
...
...
users-service/src/main/resources/application.properties
View file @
c7223662
server.port
=
8080
\ No newline at end of file
spring.application.name
=
users-service
server.port
=
8080
eureka.client.serviceUrl.defaultZone
=
${EUREKA_URL:http://localhost:8761/eureka/}
\ No newline at end of file
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