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 能访问吗?

    评论

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器