qq_41698573 2019-02-22 12:52 采纳率: 0%
浏览 1032
已结题

ssm+dubbo框架 自己的service端运行不报错 web运行也不报错 一旦访问就报错

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&timestamp=1550809827732 to the consumer 192.168.201.1 use dubbo version 2.8.4

应该是无法从注册中心找到该服务;可是我服务运行也没问题 地址也没写错

  • 写回答

2条回答 默认 最新

  • 小小菜鸟2020 2019-02-22 14:14
    关注

    brandService 能访问吗?

    评论

报告相同问题?

悬赏问题

  • ¥35 平滑拟合曲线该如何生成
  • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
  • ¥15 名为“Product”的列已属于此 DataTable
  • ¥15 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站
  • ¥50 成都蓉城足球俱乐部小程序抢票
  • ¥15 yolov7训练自己的数据集