Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

Dubbo version: 2.7.x (master)

Operating System version: Ubuntu 16.04

Java version: Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)

Steps to reproduce this issue

git checkout b0107e767651d066d68c3beaaca9736aed2292b8

mvn test -am -pl dubbo-rpc/dubbo-rpc-dubbo -Dtest=DubboProtocolTest#testDubboProtocolWithMina -DfailIfNoTests=false

Expected Result

The test should pass.

Actual Result

The test fails. Output:

Running org.apache.dubbo.rpc.protocol.dubbo.DubboProtocolTest
2018-11-08 03:47:05,604 INFO [org.apache.dubbo.common.logger.LoggerFactory:?] - using logger: org.apache.dubbo.common.logger.log4j.Log4jLoggerAdapter
2018-11-08 03:47:06,034 INFO [org.apache.dubbo.rpc.protocol.dubbo.DubboProtocol:destroy] - [DUBBO] Unexport service: dubbo://127.0.0.1:9010/org.apache.dubbo.rpc.protocol.dubbo.support.DemoService?server=mina, dubbo version: , current host: 172.17.0.12
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.657 sec <<< FAILURE! - in org.apache.dubbo.rpc.protocol.dubbo.DubboProtocolTest
testDubboProtocolWithMina(org.apache.dubbo.rpc.protocol.dubbo.DubboProtocolTest) Time elapsed: 0.086 sec <<< ERROR!
org.apache.dubbo.rpc.RpcException: Unsupported server type: mina, url: dubbo://127.0.0.1:9010/org.apache.dubbo.rpc.protocol.dubbo.support.DemoService?channel.readonly.sent=true&heartbeat=60000&server=mina
at org.apache.dubbo.rpc.protocol.dubbo.DubboProtocolTest.testDubboProtocolWithMina(DubboProtocolTest.java:99)

Results :

Tests in error:
DubboProtocolTest.testDubboProtocolWithMina:99 ? Rpc Unsupported server type: ...

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0

More Details

The test DubboProtocolTest.testDubboProtocolWithMina fails when run by itself.

The test passes when run in the whole test class, but the test does not actually test anything about mina.

A possible fix to make the test pass when run by itself (while still not testing anything about mina) is to apply the following patch:

index b67112c..7a30fec 100644
--- a/dubbo-rpc/dubbo-rpc-dubbo/src/test/java/org/apache/dubbo/rpc/protocol/dubbo/DubboProtocolTest.java
+++ b/dubbo-rpc/dubbo-rpc-dubbo/src/test/java/org/apache/dubbo/rpc/protocol/dubbo/DubboProtocolTest.java
@@ -96,6 +96,8 @@ public class DubboProtocolTest {
@Test
public void testDubboProtocolWithMina() throws Exception {
DemoService service = new DemoServiceImpl();
+ protocol.export(proxy.getInvoker(service, DemoService.class, URL.valueOf("dubbo://127.0.0.1:9010/" + DemoService.class.getName())));
+ proxy.getProxy(protocol.refer(DemoService.class, URL.valueOf("dubbo://127.0.0.1:9010/" + DemoService.class.getName()).addParameter("timeout", 3000l)));
protocol.export(proxy.getInvoker(service, DemoService.class, URL.valueOf("dubbo://127.0.0.1:9010/" + DemoService.class.getName()).addParameter(Constants.SERVER_KEY, "mina")));
service = proxy.getProxy(protocol.refer(DemoService.class, URL.valueOf("dubbo://127.0.0.1:9010/" + DemoService.class.getName()).addParameter(Constants.CLIENT_KEY, "mina").addParameter("timeout", 3000l)));
for (int i = 0; i < 10; i++) {

The test should be changed to actually test something about mina.

Issue 2:
[*] I have searched the issues of this repository and believe that this is not a duplicate.

[*] I have checked the FAQ of this repository and believe that this is not a duplicate.

Dubbo version: 2.6.2

Operating System version: CentOS 7

Java version: 1.8

@service(interfaceClass = DubboSwaggerService.class, protocol = "rest", register = false)

register is not work

@documented

@retention(RetentionPolicy.RUNTIME)

@target({ElementType.TYPE})

@inherited

public @interface Service {

Class<?> interfaceClass() default void.class;

String interfaceName() default "";

String version() default "";

String group() default "";

String path() default "";

boolean export() default false;

String token() default "";

boolean deprecated() default false;

boolean dynamic() default false;

String accesslog() default "";

int executes() default 0;

boolean register() default false; // this default value should be true