25- Third Microservice Project

 

 Third  Microservice Project


Create cloud-gateway that acts as a API Gateway for existing microservices (department-service-A and user-service-A) and configure our cloud-gateway so that it can be tracked on eureka server.


This whole process takes in following steps

1- Go to Spring Initializr website(https://start.spring.io/) and 
Create a maven project naming cloud-gateway with Eureka Discovery Client , Gateway and Spring Boot Actuator.


Image 1 - Spring Initializr




2- Import  cloud-gateway into your workspace and add eureka configuration values(like port,register and fetch) and set values true into application.properties

cloud-gateway --> src/main/resources--> application.properties 
spring.application.name=API-GATEWAY

server.port=8082

eureka.client.register-with-eureka=true
eureka.client.fetch-registry=true
eureka.instance.hostname=localhost
eureka.client.service-url.defaultZone=http://localhost:8761/eureka/




3- Add cloud-gateway configuration values(like id, uri ,predicates) and set values according to existing services  into application.properties

cloud-gateway --> src/main/resources--> application.properties 
spring.application.name=API-GATEWAY

server.port=8082

eureka.client.register-with-eureka=true
eureka.client.fetch-registry=true
eureka.instance.hostname=localhost
eureka.client.service-url.defaultZone=http://localhost:8761/eureka/

   
   

spring.cloud.gateway.routes[0].id=USER-SERVICE
spring.cloud.gateway.routes[0].uri=lb://USER-SERVICE
spring.cloud.gateway.routes[0].predicates[0]=Path=/users/**



spring.cloud.gateway.routes[1].id=DEPARTMENT-SERVICE
spring.cloud.gateway.routes[1].uri=lb://DEPARTMENT-SERVICE
spring.cloud.gateway.routes[1].predicates[0]=Path=/departments/**




4-  Add @EnableDiscoveryClient  in application class of cloud-gateway microservice (above @SpringBootApplication) 





5-  Run your service-registry only

Image 2 -  Running service registry without instances





6-  Run your service-registry , department-service-A , user-service-A and cloud-gateway


Image 3- Running service registry with instances



------------------------------------------------------------------------------------------------------

CONSOLE  FOR  SERVICE  REGITRY

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::                (v3.0.7)

2023-06-02T20:47:03.542+05:30  INFO 23328 --- [           main] c.z.s.ServiceRegistryApplication         : Starting ServiceRegistryApplication using Java 18.0.1 with PID 23328 (C:\Users\zeesh\eclipse-workspace\A_workspace\service-registry\target\classes started by ZeeK in C:\Users\zeesh\eclipse-workspace\A_workspace\service-registry)
2023-06-02T20:47:03.546+05:30  INFO 23328 --- [           main] c.z.s.ServiceRegistryApplication         : No active profile set, falling back to 1 default profile: "default"
2023-06-02T20:47:04.731+05:30  INFO 23328 --- [           main] o.s.cloud.context.scope.GenericScope     : BeanFactory id=ed14ef2b-50db-3304-8395-4cd5db651d86
2023-06-02T20:47:05.116+05:30  INFO 23328 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8761 (http)
2023-06-02T20:47:05.130+05:30  INFO 23328 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2023-06-02T20:47:05.130+05:30  INFO 23328 --- [           main] o.apache.catalina.core.StandardEngine    : Starting Servlet engine: [Apache Tomcat/10.1.8]
2023-06-02T20:47:05.252+05:30  INFO 23328 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2023-06-02T20:47:05.253+05:30  INFO 23328 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1643 ms
2023-06-02T20:47:06.218+05:30  INFO 23328 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON encoding codec LegacyJacksonJson
2023-06-02T20:47:06.220+05:30  INFO 23328 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON decoding codec LegacyJacksonJson
2023-06-02T20:47:06.443+05:30  INFO 23328 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using XML encoding codec XStreamXml
2023-06-02T20:47:06.443+05:30  INFO 23328 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using XML decoding codec XStreamXml
2023-06-02T20:47:07.458+05:30  WARN 23328 --- [           main] iguration$LoadBalancerCaffeineWarnLogger : Spring Cloud LoadBalancer is currently working with the default cache. While this cache implementation is useful for development and tests, it's recommended to use Caffeine cache in production.You can switch to using Caffeine cache, by adding it and org.springframework.cache.caffeine.CaffeineCacheManager to the classpath.
2023-06-02T20:47:07.482+05:30  INFO 23328 --- [           main] o.s.c.n.eureka.InstanceInfoFactory       : Setting initial instance status as: STARTING
2023-06-02T20:47:07.522+05:30  INFO 23328 --- [           main] com.netflix.discovery.DiscoveryClient    : Initializing Eureka in region us-east-1
2023-06-02T20:47:07.522+05:30  INFO 23328 --- [           main] com.netflix.discovery.DiscoveryClient    : Client configured to neither register nor query for data.
2023-06-02T20:47:07.534+05:30  INFO 23328 --- [           main] com.netflix.discovery.DiscoveryClient    : Discovery Client initialized at timestamp 1685719027533 with initial instances count: 0
2023-06-02T20:47:07.583+05:30  INFO 23328 --- [           main] c.n.eureka.DefaultEurekaServerContext    : Initializing ...
2023-06-02T20:47:07.585+05:30  INFO 23328 --- [           main] c.n.eureka.cluster.PeerEurekaNodes       : Adding new peer nodes [http://localhost:8761/eureka/]
2023-06-02T20:47:07.727+05:30  INFO 23328 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON encoding codec LegacyJacksonJson
2023-06-02T20:47:07.727+05:30  INFO 23328 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON decoding codec LegacyJacksonJson
2023-06-02T20:47:07.727+05:30  INFO 23328 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using XML encoding codec XStreamXml
2023-06-02T20:47:07.727+05:30  INFO 23328 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using XML decoding codec XStreamXml
2023-06-02T20:47:07.814+05:30  INFO 23328 --- [           main] c.n.eureka.cluster.PeerEurekaNodes       : Replica node URL:  http://localhost:8761/eureka/
2023-06-02T20:47:07.822+05:30  INFO 23328 --- [           main] c.n.e.registry.AbstractInstanceRegistry  : Finished initializing remote region registries. All known remote regions: []
2023-06-02T20:47:07.823+05:30  INFO 23328 --- [           main] c.n.eureka.DefaultEurekaServerContext    : Initialized
2023-06-02T20:47:07.835+05:30  INFO 23328 --- [           main] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 1 endpoint(s) beneath base path '/actuator'
2023-06-02T20:47:07.875+05:30  INFO 23328 --- [           main] o.s.c.n.e.s.EurekaServiceRegistry        : Registering application UNKNOWN with eureka with status UP
2023-06-02T20:47:07.893+05:30  INFO 23328 --- [       Thread-9] o.s.c.n.e.server.EurekaServerBootstrap   : isAws returned false
2023-06-02T20:47:07.894+05:30  INFO 23328 --- [       Thread-9] o.s.c.n.e.server.EurekaServerBootstrap   : Initialized server context
2023-06-02T20:47:07.894+05:30  INFO 23328 --- [       Thread-9] c.n.e.r.PeerAwareInstanceRegistryImpl    : Got 1 instances from neighboring DS node
2023-06-02T20:47:07.894+05:30  INFO 23328 --- [       Thread-9] c.n.e.r.PeerAwareInstanceRegistryImpl    : Renew threshold is: 1
2023-06-02T20:47:07.894+05:30  INFO 23328 --- [       Thread-9] c.n.e.r.PeerAwareInstanceRegistryImpl    : Changing status to UP
2023-06-02T20:47:07.902+05:30  INFO 23328 --- [       Thread-9] e.s.EurekaServerInitializerConfiguration : Started Eureka Server
2023-06-02T20:47:07.909+05:30  INFO 23328 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8761 (http) with context path ''
2023-06-02T20:47:07.910+05:30  INFO 23328 --- [           main] .s.c.n.e.s.EurekaAutoServiceRegistration : Updating port to 8761
2023-06-02T20:47:08.000+05:30  INFO 23328 --- [           main] c.z.s.ServiceRegistryApplication         : Started ServiceRegistryApplication in 5.067 seconds (process running for 5.618)

 

------------------------------------------------------------------------------------------------------



CONSOLE  FOR  CLOUD GATEWAY 


  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::                (v2.6.4)

2023-06-02 20:47:35.478  INFO 13332 --- [           main] c.z.c.CloudGatewayApplication            : Starting CloudGatewayApplication using Java 18.0.1 on Zeeshan with PID 13332 (C:\Users\zeesh\eclipse-workspace\A_workspace\cloud-gateway\target\classes started by ZeeK in C:\Users\zeesh\eclipse-workspace\A_workspace\cloud-gateway)
2023-06-02 20:47:35.481  INFO 13332 --- [           main] c.z.c.CloudGatewayApplication            : No active profile set, falling back to 1 default profile: "default"
2023-06-02 20:47:36.556  INFO 13332 --- [           main] o.s.cloud.context.scope.GenericScope     : BeanFactory id=c65a96a7-883b-3a1c-994e-eb91be86c41b
2023-06-02 20:47:36.637  INFO 13332 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.client.loadbalancer.reactive.LoadBalancerBeanPostProcessorAutoConfiguration' of type [org.springframework.cloud.client.loadbalancer.reactive.LoadBalancerBeanPostProcessorAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2023-06-02 20:47:36.639  INFO 13332 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.client.loadbalancer.reactive.LoadBalancerBeanPostProcessorAutoConfiguration$ReactorDeferringLoadBalancerFilterConfig' of type [org.springframework.cloud.client.loadbalancer.reactive.LoadBalancerBeanPostProcessorAutoConfiguration$ReactorDeferringLoadBalancerFilterConfig] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2023-06-02 20:47:36.640  INFO 13332 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'reactorDeferringLoadBalancerExchangeFilterFunction' of type [org.springframework.cloud.client.loadbalancer.reactive.DeferringLoadBalancerExchangeFilterFunction] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2023-06-02 20:47:37.627  INFO 13332 --- [           main] o.s.c.g.r.RouteDefinitionRouteLocator    : Loaded RoutePredicateFactory [After]
2023-06-02 20:47:37.628  INFO 13332 --- [           main] o.s.c.g.r.RouteDefinitionRouteLocator    : Loaded RoutePredicateFactory [Before]
2023-06-02 20:47:37.628  INFO 13332 --- [           main] o.s.c.g.r.RouteDefinitionRouteLocator    : Loaded RoutePredicateFactory [Between]
2023-06-02 20:47:37.628  INFO 13332 --- [           main] o.s.c.g.r.RouteDefinitionRouteLocator    : Loaded RoutePredicateFactory [Cookie]
2023-06-02 20:47:37.628  INFO 13332 --- [           main] o.s.c.g.r.RouteDefinitionRouteLocator    : Loaded RoutePredicateFactory [Header]
2023-06-02 20:47:37.628  INFO 13332 --- [           main] o.s.c.g.r.RouteDefinitionRouteLocator    : Loaded RoutePredicateFactory [Host]
2023-06-02 20:47:37.628  INFO 13332 --- [           main] o.s.c.g.r.RouteDefinitionRouteLocator    : Loaded RoutePredicateFactory [Method]
2023-06-02 20:47:37.628  INFO 13332 --- [           main] o.s.c.g.r.RouteDefinitionRouteLocator    : Loaded RoutePredicateFactory [Path]
2023-06-02 20:47:37.628  INFO 13332 --- [           main] o.s.c.g.r.RouteDefinitionRouteLocator    : Loaded RoutePredicateFactory [Query]
2023-06-02 20:47:37.628  INFO 13332 --- [           main] o.s.c.g.r.RouteDefinitionRouteLocator    : Loaded RoutePredicateFactory [ReadBody]
2023-06-02 20:47:37.628  INFO 13332 --- [           main] o.s.c.g.r.RouteDefinitionRouteLocator    : Loaded RoutePredicateFactory [RemoteAddr]
2023-06-02 20:47:37.628  INFO 13332 --- [           main] o.s.c.g.r.RouteDefinitionRouteLocator    : Loaded RoutePredicateFactory [XForwardedRemoteAddr]
2023-06-02 20:47:37.628  INFO 13332 --- [           main] o.s.c.g.r.RouteDefinitionRouteLocator    : Loaded RoutePredicateFactory [Weight]
2023-06-02 20:47:37.628  INFO 13332 --- [           main] o.s.c.g.r.RouteDefinitionRouteLocator    : Loaded RoutePredicateFactory [CloudFoundryRouteService]
2023-06-02 20:47:38.137  INFO 13332 --- [           main] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 1 endpoint(s) beneath base path '/actuator'
2023-06-02 20:47:38.333  INFO 13332 --- [           main] DiscoveryClientOptionalArgsConfiguration : Eureka HTTP Client uses RestTemplate.
2023-06-02 20:47:38.427  WARN 13332 --- [           main] iguration$LoadBalancerCaffeineWarnLogger : Spring Cloud LoadBalancer is currently working with the default cache. While this cache implementation is useful for development and tests, it's recommended to use Caffeine cache in production.You can switch to using Caffeine cache, by adding it and org.springframework.cache.caffeine.CaffeineCacheManager to the classpath.
2023-06-02 20:47:38.456  INFO 13332 --- [           main] o.s.c.n.eureka.InstanceInfoFactory       : Setting initial instance status as: STARTING
2023-06-02 20:47:38.536  INFO 13332 --- [           main] com.netflix.discovery.DiscoveryClient    : Initializing Eureka in region us-east-1
2023-06-02 20:47:38.543  INFO 13332 --- [           main] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration
2023-06-02 20:47:38.570  INFO 13332 --- [           main] com.netflix.discovery.DiscoveryClient    : Disable delta property : false
2023-06-02 20:47:38.570  INFO 13332 --- [           main] com.netflix.discovery.DiscoveryClient    : Single vip registry refresh property : null
2023-06-02 20:47:38.570  INFO 13332 --- [           main] com.netflix.discovery.DiscoveryClient    : Force full registry fetch : false
2023-06-02 20:47:38.570  INFO 13332 --- [           main] com.netflix.discovery.DiscoveryClient    : Application is null : false
2023-06-02 20:47:38.570  INFO 13332 --- [           main] com.netflix.discovery.DiscoveryClient    : Registered Applications size is zero : true
2023-06-02 20:47:38.570  INFO 13332 --- [           main] com.netflix.discovery.DiscoveryClient    : Application version is -1: true
2023-06-02 20:47:38.570  INFO 13332 --- [           main] com.netflix.discovery.DiscoveryClient    : Getting all instance registry info from the eureka server
2023-06-02 20:47:39.106  INFO 13332 --- [           main] com.netflix.discovery.DiscoveryClient    : The response status is 200
2023-06-02 20:47:39.108  INFO 13332 --- [           main] com.netflix.discovery.DiscoveryClient    : Starting heartbeat executor: renew interval is: 30
2023-06-02 20:47:39.111  INFO 13332 --- [           main] c.n.discovery.InstanceInfoReplicator     : InstanceInfoReplicator onDemand update allowed rate per min is 4
2023-06-02 20:47:39.116  INFO 13332 --- [           main] com.netflix.discovery.DiscoveryClient    : Discovery Client initialized at timestamp 1685719059115 with initial instances count: 0
2023-06-02 20:47:39.117  INFO 13332 --- [           main] o.s.c.n.e.s.EurekaServiceRegistry        : Registering application API-GATEWAY with eureka with status UP
2023-06-02 20:47:39.118  INFO 13332 --- [           main] com.netflix.discovery.DiscoveryClient    : Saw local status change event StatusChangeEvent [timestamp=1685719059118, current=UP, previous=STARTING]
2023-06-02 20:47:39.119  INFO 13332 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_API-GATEWAY/Zeeshan:API-GATEWAY:8082: registering service...
2023-06-02 20:47:39.246  INFO 13332 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient    : DiscoveryClient_API-GATEWAY/Zeeshan:API-GATEWAY:8082 - registration status: 204
2023-06-02 20:47:39.307  INFO 13332 --- [           main] o.s.b.web.embedded.netty.NettyWebServer  : Netty started on port 8082
2023-06-02 20:47:39.308  INFO 13332 --- [           main] .s.c.n.e.s.EurekaAutoServiceRegistration : Updating port to 8082
2023-06-02 20:47:39.454  INFO 13332 --- [           main] c.z.c.CloudGatewayApplication            : Started CloudGatewayApplication in 4.566 seconds (JVM running for 5.094)





------------------------------------------------------------------------------------------------------



CONSOLE  FOR   DEPARTMENT  SERVICE 

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::                (v3.0.7)

2023-06-02T20:47:03.542+05:30  INFO 23328 --- [           main] c.z.s.ServiceRegistryApplication         : Starting ServiceRegistryApplication using Java 18.0.1 with PID 23328 (C:\Users\zeesh\eclipse-workspace\A_workspace\service-registry\target\classes started by ZeeK in C:\Users\zeesh\eclipse-workspace\A_workspace\service-registry)
2023-06-02T20:47:03.546+05:30  INFO 23328 --- [           main] c.z.s.ServiceRegistryApplication         : No active profile set, falling back to 1 default profile: "default"
2023-06-02T20:47:04.731+05:30  INFO 23328 --- [           main] o.s.cloud.context.scope.GenericScope     : BeanFactory id=ed14ef2b-50db-3304-8395-4cd5db651d86
2023-06-02T20:47:05.116+05:30  INFO 23328 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8761 (http)
2023-06-02T20:47:05.130+05:30  INFO 23328 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2023-06-02T20:47:05.130+05:30  INFO 23328 --- [           main] o.apache.catalina.core.StandardEngine    : Starting Servlet engine: [Apache Tomcat/10.1.8]
2023-06-02T20:47:05.252+05:30  INFO 23328 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2023-06-02T20:47:05.253+05:30  INFO 23328 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1643 ms
2023-06-02T20:47:06.218+05:30  INFO 23328 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON encoding codec LegacyJacksonJson
2023-06-02T20:47:06.220+05:30  INFO 23328 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON decoding codec LegacyJacksonJson
2023-06-02T20:47:06.443+05:30  INFO 23328 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using XML encoding codec XStreamXml
2023-06-02T20:47:06.443+05:30  INFO 23328 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using XML decoding codec XStreamXml
2023-06-02T20:47:07.458+05:30  WARN 23328 --- [           main] iguration$LoadBalancerCaffeineWarnLogger : Spring Cloud LoadBalancer is currently working with the default cache. While this cache implementation is useful for development and tests, it's recommended to use Caffeine cache in production.You can switch to using Caffeine cache, by adding it and org.springframework.cache.caffeine.CaffeineCacheManager to the classpath.
2023-06-02T20:47:07.482+05:30  INFO 23328 --- [           main] o.s.c.n.eureka.InstanceInfoFactory       : Setting initial instance status as: STARTING
2023-06-02T20:47:07.522+05:30  INFO 23328 --- [           main] com.netflix.discovery.DiscoveryClient    : Initializing Eureka in region us-east-1
2023-06-02T20:47:07.522+05:30  INFO 23328 --- [           main] com.netflix.discovery.DiscoveryClient    : Client configured to neither register nor query for data.
2023-06-02T20:47:07.534+05:30  INFO 23328 --- [           main] com.netflix.discovery.DiscoveryClient    : Discovery Client initialized at timestamp 1685719027533 with initial instances count: 0
2023-06-02T20:47:07.583+05:30  INFO 23328 --- [           main] c.n.eureka.DefaultEurekaServerContext    : Initializing ...
2023-06-02T20:47:07.585+05:30  INFO 23328 --- [           main] c.n.eureka.cluster.PeerEurekaNodes       : Adding new peer nodes [http://localhost:8761/eureka/]
2023-06-02T20:47:07.727+05:30  INFO 23328 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON encoding codec LegacyJacksonJson
2023-06-02T20:47:07.727+05:30  INFO 23328 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON decoding codec LegacyJacksonJson
2023-06-02T20:47:07.727+05:30  INFO 23328 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using XML encoding codec XStreamXml
2023-06-02T20:47:07.727+05:30  INFO 23328 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using XML decoding codec XStreamXml
2023-06-02T20:47:07.814+05:30  INFO 23328 --- [           main] c.n.eureka.cluster.PeerEurekaNodes       : Replica node URL:  http://localhost:8761/eureka/
2023-06-02T20:47:07.822+05:30  INFO 23328 --- [           main] c.n.e.registry.AbstractInstanceRegistry  : Finished initializing remote region registries. All known remote regions: []
2023-06-02T20:47:07.823+05:30  INFO 23328 --- [           main] c.n.eureka.DefaultEurekaServerContext    : Initialized
2023-06-02T20:47:07.835+05:30  INFO 23328 --- [           main] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 1 endpoint(s) beneath base path '/actuator'
2023-06-02T20:47:07.875+05:30  INFO 23328 --- [           main] o.s.c.n.e.s.EurekaServiceRegistry        : Registering application UNKNOWN with eureka with status UP
2023-06-02T20:47:07.893+05:30  INFO 23328 --- [       Thread-9] o.s.c.n.e.server.EurekaServerBootstrap   : isAws returned false
2023-06-02T20:47:07.894+05:30  INFO 23328 --- [       Thread-9] o.s.c.n.e.server.EurekaServerBootstrap   : Initialized server context
2023-06-02T20:47:07.894+05:30  INFO 23328 --- [       Thread-9] c.n.e.r.PeerAwareInstanceRegistryImpl    : Got 1 instances from neighboring DS node
2023-06-02T20:47:07.894+05:30  INFO 23328 --- [       Thread-9] c.n.e.r.PeerAwareInstanceRegistryImpl    : Renew threshold is: 1
2023-06-02T20:47:07.894+05:30  INFO 23328 --- [       Thread-9] c.n.e.r.PeerAwareInstanceRegistryImpl    : Changing status to UP
2023-06-02T20:47:07.902+05:30  INFO 23328 --- [       Thread-9] e.s.EurekaServerInitializerConfiguration : Started Eureka Server
2023-06-02T20:47:07.909+05:30  INFO 23328 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8761 (http) with context path ''
2023-06-02T20:47:07.910+05:30  INFO 23328 --- [           main] .s.c.n.e.s.EurekaAutoServiceRegistration : Updating port to 8761
2023-06-02T20:47:08.000+05:30  INFO 23328 --- [           main] c.z.s.ServiceRegistryApplication         : Started ServiceRegistryApplication in 5.067 seconds (process running for 5.618)
2023-06-02T20:47:38.973+05:30  INFO 23328 --- [nio-8761-exec-2] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring DispatcherServlet 'dispatcherServlet'
2023-06-02T20:47:38.973+05:30  INFO 23328 --- [nio-8761-exec-2] o.s.web.servlet.DispatcherServlet        : Initializing Servlet 'dispatcherServlet'
2023-06-02T20:47:38.975+05:30  INFO 23328 --- [nio-8761-exec-2] o.s.web.servlet.DispatcherServlet        : Completed initialization in 2 ms
2023-06-02T20:47:39.243+05:30  INFO 23328 --- [nio-8761-exec-1] c.n.e.registry.AbstractInstanceRegistry  : Registered instance API-GATEWAY/Zeeshan:API-GATEWAY:8082 with status UP (replication=false)
2023-06-02T20:47:39.927+05:30  INFO 23328 --- [nio-8761-exec-3] c.n.e.registry.AbstractInstanceRegistry  : Registered instance API-GATEWAY/Zeeshan:API-GATEWAY:8082 with status UP (replication=true)
2023-06-02T20:48:07.899+05:30  INFO 23328 --- [a-EvictionTimer] c.n.e.registry.AbstractInstanceRegistry  : Running the evict task with compensationTime 0ms
2023-06-02T20:48:23.660+05:30  INFO 23328 --- [nio-8761-exec-8] c.n.e.registry.AbstractInstanceRegistry  : Registered instance DEPARTMENT-SERVICE/Zeeshan:DEPARTMENT-SERVICE:8080 with status UP (replication=false)
2023-06-02T20:48:24.170+05:30  INFO 23328 --- [nio-8761-exec-9] c.n.e.registry.AbstractInstanceRegistry  : Registered instance DEPARTMENT-SERVICE/Zeeshan:DEPARTMENT-SERVICE:8080 with status UP (replication=true)





------------------------------------------------------------------------------------------------------

CONSOLE  FOR   USER SERVICE 

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::                (v3.0.7)

2023-06-02T20:47:03.542+05:30  INFO 23328 --- [           main] c.z.s.ServiceRegistryApplication         : Starting ServiceRegistryApplication using Java 18.0.1 with PID 23328 (C:\Users\zeesh\eclipse-workspace\A_workspace\service-registry\target\classes started by ZeeK in C:\Users\zeesh\eclipse-workspace\A_workspace\service-registry)
2023-06-02T20:47:03.546+05:30  INFO 23328 --- [           main] c.z.s.ServiceRegistryApplication         : No active profile set, falling back to 1 default profile: "default"
2023-06-02T20:47:04.731+05:30  INFO 23328 --- [           main] o.s.cloud.context.scope.GenericScope     : BeanFactory id=ed14ef2b-50db-3304-8395-4cd5db651d86
2023-06-02T20:47:05.116+05:30  INFO 23328 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8761 (http)
2023-06-02T20:47:05.130+05:30  INFO 23328 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2023-06-02T20:47:05.130+05:30  INFO 23328 --- [           main] o.apache.catalina.core.StandardEngine    : Starting Servlet engine: [Apache Tomcat/10.1.8]
2023-06-02T20:47:05.252+05:30  INFO 23328 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2023-06-02T20:47:05.253+05:30  INFO 23328 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1643 ms
2023-06-02T20:47:06.218+05:30  INFO 23328 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON encoding codec LegacyJacksonJson
2023-06-02T20:47:06.220+05:30  INFO 23328 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON decoding codec LegacyJacksonJson
2023-06-02T20:47:06.443+05:30  INFO 23328 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using XML encoding codec XStreamXml
2023-06-02T20:47:06.443+05:30  INFO 23328 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using XML decoding codec XStreamXml
2023-06-02T20:47:07.458+05:30  WARN 23328 --- [           main] iguration$LoadBalancerCaffeineWarnLogger : Spring Cloud LoadBalancer is currently working with the default cache. While this cache implementation is useful for development and tests, it's recommended to use Caffeine cache in production.You can switch to using Caffeine cache, by adding it and org.springframework.cache.caffeine.CaffeineCacheManager to the classpath.
2023-06-02T20:47:07.482+05:30  INFO 23328 --- [           main] o.s.c.n.eureka.InstanceInfoFactory       : Setting initial instance status as: STARTING
2023-06-02T20:47:07.522+05:30  INFO 23328 --- [           main] com.netflix.discovery.DiscoveryClient    : Initializing Eureka in region us-east-1
2023-06-02T20:47:07.522+05:30  INFO 23328 --- [           main] com.netflix.discovery.DiscoveryClient    : Client configured to neither register nor query for data.
2023-06-02T20:47:07.534+05:30  INFO 23328 --- [           main] com.netflix.discovery.DiscoveryClient    : Discovery Client initialized at timestamp 1685719027533 with initial instances count: 0
2023-06-02T20:47:07.583+05:30  INFO 23328 --- [           main] c.n.eureka.DefaultEurekaServerContext    : Initializing ...
2023-06-02T20:47:07.585+05:30  INFO 23328 --- [           main] c.n.eureka.cluster.PeerEurekaNodes       : Adding new peer nodes [http://localhost:8761/eureka/]
2023-06-02T20:47:07.727+05:30  INFO 23328 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON encoding codec LegacyJacksonJson
2023-06-02T20:47:07.727+05:30  INFO 23328 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON decoding codec LegacyJacksonJson
2023-06-02T20:47:07.727+05:30  INFO 23328 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using XML encoding codec XStreamXml
2023-06-02T20:47:07.727+05:30  INFO 23328 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using XML decoding codec XStreamXml
2023-06-02T20:47:07.814+05:30  INFO 23328 --- [           main] c.n.eureka.cluster.PeerEurekaNodes       : Replica node URL:  http://localhost:8761/eureka/
2023-06-02T20:47:07.822+05:30  INFO 23328 --- [           main] c.n.e.registry.AbstractInstanceRegistry  : Finished initializing remote region registries. All known remote regions: []
2023-06-02T20:47:07.823+05:30  INFO 23328 --- [           main] c.n.eureka.DefaultEurekaServerContext    : Initialized
2023-06-02T20:47:07.835+05:30  INFO 23328 --- [           main] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 1 endpoint(s) beneath base path '/actuator'
2023-06-02T20:47:07.875+05:30  INFO 23328 --- [           main] o.s.c.n.e.s.EurekaServiceRegistry        : Registering application UNKNOWN with eureka with status UP
2023-06-02T20:47:07.893+05:30  INFO 23328 --- [       Thread-9] o.s.c.n.e.server.EurekaServerBootstrap   : isAws returned false
2023-06-02T20:47:07.894+05:30  INFO 23328 --- [       Thread-9] o.s.c.n.e.server.EurekaServerBootstrap   : Initialized server context
2023-06-02T20:47:07.894+05:30  INFO 23328 --- [       Thread-9] c.n.e.r.PeerAwareInstanceRegistryImpl    : Got 1 instances from neighboring DS node
2023-06-02T20:47:07.894+05:30  INFO 23328 --- [       Thread-9] c.n.e.r.PeerAwareInstanceRegistryImpl    : Renew threshold is: 1
2023-06-02T20:47:07.894+05:30  INFO 23328 --- [       Thread-9] c.n.e.r.PeerAwareInstanceRegistryImpl    : Changing status to UP
2023-06-02T20:47:07.902+05:30  INFO 23328 --- [       Thread-9] e.s.EurekaServerInitializerConfiguration : Started Eureka Server
2023-06-02T20:47:07.909+05:30  INFO 23328 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8761 (http) with context path ''
2023-06-02T20:47:07.910+05:30  INFO 23328 --- [           main] .s.c.n.e.s.EurekaAutoServiceRegistration : Updating port to 8761
2023-06-02T20:47:08.000+05:30  INFO 23328 --- [           main] c.z.s.ServiceRegistryApplication         : Started ServiceRegistryApplication in 5.067 seconds (process running for 5.618)
2023-06-02T20:47:38.973+05:30  INFO 23328 --- [nio-8761-exec-2] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring DispatcherServlet 'dispatcherServlet'
2023-06-02T20:47:38.973+05:30  INFO 23328 --- [nio-8761-exec-2] o.s.web.servlet.DispatcherServlet        : Initializing Servlet 'dispatcherServlet'
2023-06-02T20:47:38.975+05:30  INFO 23328 --- [nio-8761-exec-2] o.s.web.servlet.DispatcherServlet        : Completed initialization in 2 ms
2023-06-02T20:47:39.243+05:30  INFO 23328 --- [nio-8761-exec-1] c.n.e.registry.AbstractInstanceRegistry  : Registered instance API-GATEWAY/Zeeshan:API-GATEWAY:8082 with status UP (replication=false)
2023-06-02T20:47:39.927+05:30  INFO 23328 --- [nio-8761-exec-3] c.n.e.registry.AbstractInstanceRegistry  : Registered instance API-GATEWAY/Zeeshan:API-GATEWAY:8082 with status UP (replication=true)
2023-06-02T20:48:07.899+05:30  INFO 23328 --- [a-EvictionTimer] c.n.e.registry.AbstractInstanceRegistry  : Running the evict task with compensationTime 0ms
2023-06-02T20:48:23.660+05:30  INFO 23328 --- [nio-8761-exec-8] c.n.e.registry.AbstractInstanceRegistry  : Registered instance DEPARTMENT-SERVICE/Zeeshan:DEPARTMENT-SERVICE:8080 with status UP (replication=false)
2023-06-02T20:48:24.170+05:30  INFO 23328 --- [nio-8761-exec-9] c.n.e.registry.AbstractInstanceRegistry  : Registered instance DEPARTMENT-SERVICE/Zeeshan:DEPARTMENT-SERVICE:8080 with status UP (replication=true)
2023-06-02T20:49:06.385+05:30  INFO 23328 --- [nio-8761-exec-7] c.n.e.registry.AbstractInstanceRegistry  : Registered instance USER-SERVICE/Zeeshan:USER-SERVICE:8081 with status UP (replication=false)
2023-06-02T20:49:06.899+05:30  INFO 23328 --- [nio-8761-exec-8] c.n.e.registry.AbstractInstanceRegistry  : Registered instance USER-SERVICE/Zeeshan:USER-SERVICE:8081 with status UP (replication=true)
2023-06-02T20:49:07.900+05:30  INFO 23328 --- [a-EvictionTimer] c.n.e.registry.AbstractInstanceRegistry  : Running the evict task with compensationTime 1ms





Comments

Popular posts from this blog

INDEX OF JAVA 8 and MICROSERVICES BLOG