WillemJiang closed pull request #159: SCB-428 Changed idGenerator bean name
omegaUniquaIdGenerator
URL: https://github.com/apache/incubator-servicecomb-saga/pull/159
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/omega/omega-spring-starter/src/main/java/org/apache/servicecomb/saga/omega/spring/OmegaSpringConfig.java
b/omega/omega-spring-starter/src/main/java/org/apache/servicecomb/saga/omega/spring/OmegaSpringConfig.java
index fa4027b6..14220255 100644
---
a/omega/omega-spring-starter/src/main/java/org/apache/servicecomb/saga/omega/spring/OmegaSpringConfig.java
+++
b/omega/omega-spring-starter/src/main/java/org/apache/servicecomb/saga/omega/spring/OmegaSpringConfig.java
@@ -27,6 +27,8 @@
import org.apache.servicecomb.saga.omega.format.MessageFormat;
import org.apache.servicecomb.saga.omega.transaction.MessageHandler;
import org.apache.servicecomb.saga.omega.transaction.MessageSender;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@@ -35,13 +37,13 @@
@Configuration
class OmegaSpringConfig {
- @Bean
+ @Bean(name = {"omegaUniqueIdGenerator"})
IdGenerator<String> idGenerator() {
return new UniqueIdGenerator();
}
@Bean
- OmegaContext omegaContext(IdGenerator<String> idGenerator) {
+ OmegaContext omegaContext(@Qualifier("omegaUniqueIdGenerator")
IdGenerator<String> idGenerator) {
return new OmegaContext(idGenerator);
}
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services