-
Notifications
You must be signed in to change notification settings - Fork 31
io microsphere spring cloud client service registry autoconfigure SimpleAutoServiceRegistrationAutoConfiguration
Type: Class | Module: microsphere-spring-cloud-commons | Package: io.microsphere.spring.cloud.client.service.registry.autoconfigure | Since: 1.0.0
Auto-Configuration class for SimpleAutoServiceRegistration
public class SimpleAutoServiceRegistrationAutoConfigurationAuthor: Mercy
-
Introduced in:
1.0.0 -
Current Project Version:
0.2.9-SNAPSHOT
This component is tested and compatible with the following Java versions:
| Java Version | Status |
|---|---|
| Java 17 | ✅ Compatible |
| Java 21 | ✅ Compatible |
| Java 25 | ✅ Compatible |
// Auto-configured via Spring Boot; the bean is available for injection:
@Autowired
Registration registration;
String serviceId = registration.getServiceId();// Auto-configured when no other ServiceRegistry bean is present:
@Autowired
ServiceRegistry<Registration> serviceRegistry;
serviceRegistry.register(registration);Add the following dependency to your pom.xml:
<dependency>
<groupId>io.github.microsphere-projects</groupId>
<artifactId>microsphere-spring-cloud-commons</artifactId>
<version>${microsphere-spring-cloud.version}</version>
</dependency>Tip: Use the BOM (
microsphere-spring-cloud-dependencies) for consistent version management. See the Getting Started guide.
import io.microsphere.spring.cloud.client.service.registry.autoconfigure.SimpleAutoServiceRegistrationAutoConfiguration;| Method | Description |
|---|---|
registration |
The property name prefix : "microsphere.spring.cloud.service-registry.auto-registration.simple." |
serviceRegistry |
Creates an InMemoryServiceRegistry bean as the default ServiceRegistry implementation. |
public Registration registration(
@Value("${spring.application.name:default}")The property name prefix : "microsphere.spring.cloud.service-registry.auto-registration.simple." / public static final String PROPERTY_NAME_PREFIX = MICROSPHERE_SPRING_CLOUD_PROPERTY_NAME_PREFIX + "service-registry.auto-registration.simple.";
/** The property name : "microsphere.spring.cloud.service-registry.auto-registration.simple.enabled" /
public ServiceRegistry<Registration> serviceRegistry()Creates an InMemoryServiceRegistry bean as the default ServiceRegistry implementation.
Example Usage:
{@code
// Auto-configured when no other ServiceRegistry bean is present:
## See Also
- `SimpleAutoServiceRegistration`
---
*This documentation was auto-generated from the source code of [microsphere-spring-cloud](https://github.com/microsphere-projects/microsphere-spring-cloud).*
spring-cloud-commons
- AbstractServiceRegistrationEndpoint
- CommonsPropertyConstants
- ConditionalOnAutoServiceRegistrationEnabled
- ConditionalOnFeaturesEnabled
- ConditionalOnLoadBalancerEnabled
- ConditionalOnMultipleRegistrationEnabled
- ConditionalOnUtilEnabled
- DefaultRegistration
- DiscoveryClientAutoConfiguration
- DiscoveryClientConstants
- DiscoveryUtils
- EventPublishingRegistrationAspect
- FaultTolerancePropertyConstants
- InMemoryServiceRegistry
- InstanceConstants
- LoadBalancerUtils
- MultipleAutoServiceRegistration
- MultipleRegistration
- MultipleServiceRegistry
- ReactiveDiscoveryClientAdapter
- ReactiveDiscoveryClientAutoConfiguration
- RegistrationCustomizer
- RegistrationDeregisteredEvent
- RegistrationEvent
- RegistrationMetaData
- RegistrationPreDeregisteredEvent
- RegistrationPreRegisteredEvent
- RegistrationRegisteredEvent
- ServiceDeregistrationEndpoint
- ServiceInstanceUtils
- ServiceInstancesChangedEvent
- ServiceRegistrationEndpoint
- ServiceRegistrationEndpointAutoConfiguration
- ServiceRegistryAutoConfiguration
- SimpleAutoServiceRegistration
- SimpleAutoServiceRegistrationAutoConfiguration
- SimpleServiceRegistry
- SpecificationAutoConfiguration
- SpecificationBeanPostProcessor
- SpecificationCustomizer
- SpringCloudPropertyConstants
- TomcatDynamicConfigurationListener
- TomcatFaultToleranceAutoConfiguration
- UnionDiscoveryClient
- WebFluxServiceRegistryAutoConfiguration
- WebMvcServiceRegistryAutoConfiguration
- WebServiceRegistryAutoConfiguration
- WeightedRoundRobin
spring-cloud-openfeign
- AutoRefreshCapability
- AutoRefreshCapabilityCustomizer
- CompositedRequestInterceptor
- DecoratedContract
- DecoratedDecoder
- DecoratedEncoder
- DecoratedErrorDecoder
- DecoratedFeignComponent
- DecoratedQueryMapEncoder
- DecoratedRetryer
- EnableFeignAutoRefresh
- FeignAutoConfiguration
- FeignClientAutoRefreshAutoConfiguration
- FeignClientConfigurationChangedListener
- FeignComponentRegistry
- NoOpRequestInterceptor
- Refreshable