You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "linux-chaina (GitHub)" <gi...@apache.org> on 2019/03/10 05:49:52 UTC

[GitHub] [incubator-dubbo-spring-boot-project] linux-chaina opened issue #462: 为什么AutoConfiguration不生效,需要手动@EnableDubbo

依赖版本:0.2.0

启动类:
```java
@SpringBootApplication
public class Application {
    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }
}
```

yml配置

```yaml
dubbo:
  application:
    name: test
    owner: test
  registry:
    protocol: zookeeper
    address: zookeeper://127.0.0.1:2181
  scan:
    base-packages: x.springboot.dubbo.provider.api   # 这里配置的是实现类的包路径
```

问题是为什么
`com.alibaba.boot.dubbo.autoconfigure.DubboAutoConfiguration` 为什么不生效,
况且你这里都默认true
` @ConditionalOnProperty(prefix = DUBBO_PREFIX, name = "enabled", matchIfMissing = true, havingValue = "true")` 

然而还是需要我手动在启动类上加  `@EnableDubbo`  才能能效,wtf???尼克扬表情~
谁来解释下?


[ Full content available at: https://github.com/apache/incubator-dubbo-spring-boot-project/issues/462 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo-spring-boot-project] linux-chaina commented on issue #462: 为什么AutoConfiguration不生效,需要手动@EnableDubbo

Posted by "linux-chaina (GitHub)" <gi...@apache.org>.
😤

[ Full content available at: https://github.com/apache/incubator-dubbo-spring-boot-project/issues/462 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo-spring-boot-project] linux-chaina commented on issue #462: 为什么AutoConfiguration不生效,需要手动@EnableDubbo

Posted by "linux-chaina (GitHub)" <gi...@apache.org>.
```
  protocol:
    name: dubbo
    port: 20880
```
这个也配置了的。

[ Full content available at: https://github.com/apache/incubator-dubbo-spring-boot-project/issues/462 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo-spring-boot-project] mercyblitz commented on issue #462: 为什么AutoConfiguration不生效,需要手动@EnableDubbo

Posted by "mercyblitz (GitHub)" <gi...@apache.org>.
@linux-chaina Please refer here : https://github.com/apache/incubator-dubbo-spring-boot-project/blob/master/README.md#legacy-versions

[ Full content available at: https://github.com/apache/incubator-dubbo-spring-boot-project/issues/462 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo-spring-boot-project] mercyblitz commented on issue #462: 为什么AutoConfiguration不生效,需要手动@EnableDubbo

Posted by "mercyblitz (GitHub)" <gi...@apache.org>.
There is a known issue in `0.2.0`, please update `0.2.1.RELEASE` to resolve this issue.

[ Full content available at: https://github.com/apache/incubator-dubbo-spring-boot-project/issues/462 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo-spring-boot-project] linux-chaina commented on issue #462: 为什么AutoConfiguration不生效,需要手动@EnableDubbo

Posted by "linux-chaina (GitHub)" <gi...@apache.org>.
oh shit, 似乎要yml配置酱紫写:
`base-packages: xxx.xxx.xxx` 不生效
`basePackages: 'xxx.xxx.xxx'` this works. !!!
this is unbelievable.....

[ Full content available at: https://github.com/apache/incubator-dubbo-spring-boot-project/issues/462 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo-spring-boot-project] mercyblitz closed issue #462: 为什么AutoConfiguration不生效,需要手动@EnableDubbo

Posted by "mercyblitz (GitHub)" <gi...@apache.org>.
[ issue closed by mercyblitz ]

[ Full content available at: https://github.com/apache/incubator-dubbo-spring-boot-project/issues/462 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org