MicroServices with Spring: Difference between revisions
From My Limbic Wiki
(Page créée avec « =Vulgarisation= ==Spécificités dans une Arborescence Spring== ===Eureka=== Is the registration service, all services will connect to the same adress: http://localhost:90... ») |
(→Server) |
||
Line 4: | Line 4: | ||
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=== | ===Server=== | ||
* Pom.xml | * '''Pom.xml''' | ||
** Dependencies: | ** Dependencies: | ||
*** spring-cloud-starter-netflix-eureka-server | *** spring-cloud-starter-netflix-eureka-server | ||
*** spring-boot : web, test & devtools | *** spring-boot : web, test & devtools | ||
* src/main/resources | * '''src/main/resources''' | ||
** application.properties | ** application.properties | ||
'''# Name''' | '''# Name''' | ||
Line 17: | Line 17: | ||
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 | * '''src/main/java''' | ||
** com.microservices.server | ** com.microservices.server | ||
*** EurekaServerApplication.java | *** EurekaServerApplication.java | ||
@SpringBootApplication | @SpringBootApplication | ||
'''@EnableEurekaServer''' // Enable eureka server | '''@EnableEurekaServer''' // Enable eureka server | ||
===Zuul=== | ===Zuul=== | ||
===Server=== | ===Server=== | ||
===Server=== | ===Server=== | ||
===Server=== | ===Server=== |
Revision as of 22:35, 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
Server
- Pom.xml
- Dependencies:
- spring-cloud-starter-netflix-eureka-server
- spring-boot : web, test & devtools
- Dependencies:
- src/main/resources
- application.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
- src/main/java
- com.microservices.server
- EurekaServerApplication.java
- com.microservices.server
@SpringBootApplication @EnableEurekaServer // Enable eureka server