MicroServices with Spring: Difference between revisions

From My Limbic Wiki
Line 3: Line 3:
===Eureka===
===Eureka===
Is the registration service, all services will connect to the same adress: http://localhost:9000 for example
Is the registration service, all services will connect to the same adress: http://localhost:9000 for example
===Server===
 
* '''Pom.xml'''
{| class="wikitable"
** Dependencies:
|-
*** spring-cloud-starter-netflix-eureka-server
! scope="col"| Fichiers
*** spring-boot : web, test & devtools
! scope="col"| Server
* '''src/main/resources'''
! scope="col"| Zuul
** application.properties
! scope="col"| Image
! scope="col"| Gallery
! scope="col"| Common
! scope="col"| Auth
|-
! scope="row"| Pom.xml
|
* Dependencies
spring-cloud-starter-netflix-eureka-server
spring-boot : web, test & devtools
|
*
*
|
*
*
|
*
*
|
*
*
|
*
*
|-
! scope="row"| Properties
|
  '''# Name'''
  '''# Name'''
  spring.application.name=eureka-server
  spring.application.name=eureka-server
Line 17: Line 44:
  eureka.client.register-with-eureka=false
  eureka.client.register-with-eureka=false
  eureka.client.fetch-registry=false
  eureka.client.fetch-registry=false
* '''src/main/java'''
|
** com.microservices.server
//coming
*** EurekaServerApplication.java
|
//coming
|
//coming
|
//coming
|
//coming
|-
! scope="row"| Main
|
* com.microservices.server.EurekaServerApplication.java
  @SpringBootApplication
  @SpringBootApplication
  '''@EnableEurekaServer''' // Enable eureka server
  '''@EnableEurekaServer''' // Enable eureka server
 
|-
===Zuul===
|}
===Server===
===Server===
===Server===

Revision as of 21:59, 20 September 2019

Vulgarisation

Spécificités dans une Arborescence Spring

Eureka

Is the registration service, all services will connect to the same adress: http://localhost:9000 for example

Fichiers Server Zuul Image Gallery Common Auth
Pom.xml
  • Dependencies
spring-cloud-starter-netflix-eureka-server
spring-boot : web, test & devtools
Properties
# Name
spring.application.name=eureka-server
# Default Port
server.port=8761
# Eureka server may not be a Client
eureka.client.register-with-eureka=false
eureka.client.fetch-registry=false
//coming
//coming
//coming
//coming
//coming
Main
  • com.microservices.server.EurekaServerApplication.java
@SpringBootApplication
@EnableEurekaServer // Enable eureka server