springboot+dubbo ApplicationConfig.application == null
springboot1.5.9+jdk7+dubbo2.5.3
spring-boot dubbo引用的包不一样,application.properties配置中的名称不一样
方式1:
<dependency>
<groupId>com.alibaba.spring.boot</groupId>
<artifactId>dubbo-spring-boot-starter</artifactId>
<version>2.0.0</version>
</dependency>
dubbo.application.name=mporta
dubbo.registry.address=zookeeper://192.128.4.12
启动类上加@EnableDubbo
方式2:
**<dependency>
<groupId>io.dubbo.springboot</groupId>
<artifactId>spring-boot-starter-dubbo</artifactId>
<version>1.0.0</version>
</dependency>**
spring.dubbo.application.name=mporta
spring.dubbo.registry.address=zookeeper://192.128.4.12
spring.dubbo.scan=com.yuecheng.hops.xyportal
启动类上不用加只需@SpringBootApplication
不需要连接数据库操作:
@SpringBootApplicationexclude={DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class})