wujimin commented on a change in pull request #1013: 
[SCB-1047]microservice.yaml  service_description.version support form…
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/1013#discussion_r238156749
 
 

 ##########
 File path: 
service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/registry/MicroserviceFactory.java
 ##########
 @@ -53,8 +54,11 @@ private Microservice 
createMicroserviceFromDefinition(Configuration configuratio
     
microservice.setServiceName(configuration.getString(CONFIG_QUALIFIED_MICROSERVICE_NAME_KEY,
         DEFAULT_MICROSERVICE_NAME));
     microservice.setAppId(configuration.getString(CONFIG_APPLICATION_ID_KEY, 
DEFAULT_APPLICATION_ID));
-    
microservice.setVersion(configuration.getString(CONFIG_QUALIFIED_MICROSERVICE_VERSION_KEY,
-        DEFAULT_MICROSERVICE_VERSION));
+    String version = 
configuration.getString(CONFIG_QUALIFIED_MICROSERVICE_VERSION_KEY,
+        DEFAULT_MICROSERVICE_VERSION);
+    //check version format
+    VersionRuleUtils.checkVersionFormat(version);
 
 Review comment:
   versionRule to check version?

----------------------------------------------------------------
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

Reply via email to