dragon-zhang commented on code in PR #3851:
URL: https://github.com/apache/shenyu/pull/3851#discussion_r945807587


##########
shenyu-spring-boot-starter/shenyu-spring-boot-starter-client/shenyu-spring-boot-starter-client-motan/src/main/java/org/apache/shenyu/springboot/starter/client/motan/ShenyuMotanClientConfiguration.java:
##########
@@ -46,4 +57,78 @@ public class ShenyuMotanClientConfiguration {
     public MotanServiceEventListener motanServiceEventListener(final 
ShenyuClientConfig clientConfig, final ShenyuClientRegisterRepository 
shenyuClientRegisterRepository) {
         return new 
MotanServiceEventListener(clientConfig.getClient().get(RpcTypeEnum.MOTAN.getName()),
 shenyuClientRegisterRepository);
     }
+
+    /**
+     * motan registry.
+     *
+     * @return registryProperties
+     */
+    @Bean
+    @ConfigurationProperties(prefix = "motan.registry")
+    public RegistryProperties registryProperties() {
+        return new RegistryProperties();
+    }
+
+    /**
+     * shenyu motan properties.
+     *
+     * @return shenyuMotanProperties
+     */
+    @Bean
+    @ConfigurationProperties(prefix = "shenyu.client.motan")
+    public ShenyuMotanProperties shenyuMotanProperties() {
+        return new ShenyuMotanProperties();
+    }
+
+    /**
+     * define the annotation bean, set the scan package.
+     * @param packagePath package path
+     * @return  annotationBean
+     */
+
+    @Bean
+    
@Value("${shenyu.client.motan.packagePath:org.apache.shenyu.examples.motan.service}")
+    public AnnotationBean motanAnnotationBean(final String packagePath) {
+        AnnotationBean motanAnnotationBean = new AnnotationBean();
+        motanAnnotationBean.setPackage(packagePath);
+        return motanAnnotationBean;
+    }

Review Comment:
   Maybe it's better put `packagePath` to `ShenyuMotanConfig` ? And it's 
necessary to remove default value.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to