forked from apache/dubbo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DUBBO-627 为ServiceConfig 支持配置 generic添加单元测试,覆盖使用 xml 配置时 url 中是否带上了 正…
…确的 generic 配置
- Loading branch information
kimi
committed
Jan 9, 2013
1 parent
3dccbc6
commit e8970a0
Showing
3 changed files
with
64 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
...dubbo-config-spring/src/test/java/com/alibaba/dubbo/config/spring/GenericDemoService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.alibaba.dubbo.config.spring; | ||
|
||
import com.alibaba.dubbo.rpc.service.GenericException; | ||
import com.alibaba.dubbo.rpc.service.GenericService; | ||
|
||
/** | ||
* @author <a href="mailto:[email protected]">kimi</a> | ||
*/ | ||
public class GenericDemoService implements GenericService { | ||
|
||
public Object $invoke(String method, String[] parameterTypes, Object[] args) throws GenericException { | ||
return null; | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
...dubbo-config-spring/src/test/resources/com/alibaba/dubbo/config/spring/generic-export.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<!-- | ||
- Copyright 1999-2011 Alibaba Group. | ||
- | ||
- Licensed under the Apache License, Version 2.0 (the "License"); | ||
- you may not use this file except in compliance with the License. | ||
- You may obtain a copy of the License at | ||
- | ||
- https://www.apache.org/licenses/LICENSE-2.0 | ||
- | ||
- Unless required by applicable law or agreed to in writing, software | ||
- distributed under the License is distributed on an "AS IS" BASIS, | ||
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
- See the License for the specific language governing permissions and | ||
- limitations under the License. | ||
--> | ||
<beans xmlns="https://www.springframework.org/schema/beans" | ||
xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:dubbo="https://code.alibabatech.com/schema/dubbo" | ||
xsi:schemaLocation="https://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-2.5.xsd | ||
https://code.alibabatech.com/schema/dubbo https://code.alibabatech.com/schema/dubbo/dubbo.xsd | ||
"> | ||
|
||
<!-- 当前应用信息配置 --> | ||
<dubbo:application name="generic-provider" /> | ||
|
||
<!-- 连接注册中心配置 --> | ||
<dubbo:registry address="N/A" /> | ||
|
||
<!-- 暴露服务协议配置 --> | ||
<dubbo:protocol name="dubbo" port="20813" /> | ||
|
||
<!-- 暴露服务配置 --> | ||
<dubbo:service id="dubboDemoService" generic="bean" interface="com.alibaba.dubbo.config.spring.api.DemoService" ref="demoService" /> | ||
|
||
<bean id="demoService" class="com.alibaba.dubbo.config.spring.GenericDemoService" /> | ||
|
||
</beans> |