@Test public void testDefaultRegistration() { EurekaInstanceConfigBean eurekaInstanceConfigBean = eurekaInstanceAutoConfiguration.eurekaInstanceConfigBean(); assertEquals(HOSTNAME + ":" + INSTANCE_ID, eurekaInstanceConfigBean.getInstanceId()); assertEquals(HOSTNAME, eurekaInstanceConfigBean.getHostname()); assertEquals(80, eurekaInstanceConfigBean.getNonSecurePort()); assertEquals(443, eurekaInstanceConfigBean.getSecurePort()); assertTrue(eurekaInstanceConfigBean.getSecurePortEnabled()); Map<String, String> metadata = eurekaInstanceConfigBean.getMetadataMap(); assertEquals(INSTANCE_GUID, metadata.get("cfAppGuid")); assertEquals(INSTANCE_INDEX, metadata.get("cfInstanceIndex")); assertEquals(INSTANCE_ID, metadata.get("instanceId")); assertEquals(ZONE, metadata.get("zone")); }
@Bean public EurekaInstanceConfigBean eurekaInstanceConfigBean() { if (!StringUtils.isEmpty(registrationMethod)) { LOGGER.info("Eureka registration method: " + registrationMethod); if (ROUTE_REGISTRATION_METHOD.equals(registrationMethod)) { return getRouteRegistration(); } if (DIRECT_REGISTRATION_METHOD.equals(registrationMethod)) { return getDirectRegistration(); } } return getDefaultRegistration(); }
EurekaInstanceAutoConfiguration { @Bean public EurekaInstanceConfigBean eurekaInstanceConfigBean() { if (!StringUtils.isEmpty(registrationMethod)) { LOGGER.info("Eureka registration method: " + registrationMethod); if (ROUTE_REGISTRATION_METHOD.equals(registrationMethod)) { return getRouteRegistration(); } if (DIRECT_REGISTRATION_METHOD.equals(registrationMethod)) { return getDirectRegistration(); } } return getDefaultRegistration(); } }
EurekaInstanceAutoConfiguration { @Bean public EurekaInstanceConfigBean eurekaInstanceConfigBean() { if (!StringUtils.isEmpty(registrationMethod)) { LOGGER.info("Eureka registration method: " + registrationMethod); if (ROUTE_REGISTRATION_METHOD.equals(registrationMethod)) { return getRouteRegistration(); } if (DIRECT_REGISTRATION_METHOD.equals(registrationMethod)) { return getDirectRegistration(); } } return getDefaultRegistration(); }  }
EurekaInstanceAutoConfiguration { @Bean public EurekaInstanceConfigBean eurekaInstanceConfigBean() { if (!StringUtils.isEmpty(registrationMethod)) { LOGGER.info("Eureka registration method: " + registrationMethod); if (ROUTE_REGISTRATION_METHOD.equals(registrationMethod)) { return getRouteRegistration(); } if (DIRECT_REGISTRATION_METHOD.equals(registrationMethod)) { return getDirectRegistration(); } } return getDefaultRegistration(); }  @Bean VirtualHostNamesBean getVirtualHostNames(); @Bean EurekaInstanceConfigBean eurekaInstanceConfigBean(); @Bean SurgicalRoutingRequestTransformer surgicalRoutingLoadBalancerRequestTransformer(); }
EurekaInstanceAutoConfiguration { @Bean public EurekaInstanceConfigBean eurekaInstanceConfigBean() { if (!StringUtils.isEmpty(registrationMethod)) { LOGGER.info("Eureka registration method: " + registrationMethod); if (ROUTE_REGISTRATION_METHOD.equals(registrationMethod)) { return getRouteRegistration(); } if (DIRECT_REGISTRATION_METHOD.equals(registrationMethod)) { return getDirectRegistration(); } } return getDefaultRegistration(); }  @Bean VirtualHostNamesBean getVirtualHostNames(); @Bean EurekaInstanceConfigBean eurekaInstanceConfigBean(); @Bean SurgicalRoutingRequestTransformer surgicalRoutingLoadBalancerRequestTransformer();  }