package com.pinyougou.sellergoods.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import com.alibaba.dubbo.config.annotation.Service;
import com.pinyougou.mapper.TbBrandMapper;
import com.pinyougou.pojo.TbBrand;
import com.pinyougou.sellergoods.service.BrandService;
@Service
public class BrandServiceImpl implements BrandService{
@Autowired
private TbBrandMapper brandMapper;
public List<TbBrand> findAll() {
List<TbBrand> list = brandMapper.selectByExample(null);
return list;
}
}
自己写了一个brandService运行是正常的 zookeeper ip也没错 就是获取不到服务 启动controller访问页面时报错
错误信息如下
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'brandController' defined in file [F:\workspace\pinyougou-parent\pinyougou-manager-web\target\classes\com\pinyougou\manager\controller\BrandController.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanInitializationException: Failed to init remote service reference at filed brandservice in class com.pinyougou.manager.controller.BrandController; nested exception is java.lang.IllegalStateException: Failed to check the status of the service com.pinyougou.sellergoods.service.BrandService. No provider available for the service com.pinyougou.sellergoods.service.BrandService from the url zookeeper://192.168.25.132:2181/com.alibaba.dubbo.registry.RegistryService?application=com.pinyougou.manager.controller&dubbo=2.8.4&interface=com.pinyougou.sellergoods.service.BrandService&methods=findAll&pid=4104&revision=0.0.1-SNAPSHOT&side=consumer×tamp=1550809827732 to the consumer 192.168.201.1 use dubbo version 2.8.4
应该是无法从注册中心找到该服务;可是我服务运行也没问题 地址也没写错