会员可以在此提问,百战程序员老师有问必答
对大家有帮助的问答会被标记为“推荐”
看完课程过来浏览一下别人提的问题,会帮你学得更全面
截止目前,同学们一共提了 132499个问题
JAVA 全系列/第六阶段:项目管理与SSM框架/Mybatis 23522楼
Python 全系列/第三阶段:Python 网络与并发编程/网络通信 23524楼
JAVA 全系列/第二阶段:JAVA 基础深化和提高/智能电话本项目实战 23525楼
JAVA 全系列/第三阶段:数据库编程/JDBC技术(旧) 23526楼
JAVA 全系列/第六阶段:项目管理与SSM框架/SpringMVC 23527楼
JAVA 全系列/第九阶段:Spring Boot实战/Spring Boot 23528楼
Python 全系列/第二阶段:Python 深入与提高/GUI编程(隐藏) 23529楼

老师,这个错误是怎么回事?我之前把一个写过的包名改了,然后再写别的就出现这种情况

是改了包名,没自动注入吗?



org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'tbItemParamController': Unsatisfied dependency expressed through field 'tbItemParamService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tbItemParamServiceImpl': Injection of @Reference dependencies is failed; nested exception is java.lang.IllegalStateException: Failed to check the status of the service com.ego.dubbo.service.TbItemParamDubboService. No provider available for the service com.ego.dubbo.service.TbItemParamDubboService from the url zookeeper://192.168.8.128:2181/org.apache.dubbo.registry.RegistryService?application=ego-manage&dubbo=2.0.2&init=false&interface=com.ego.dubbo.service.TbItemParamDubboService&methods=selectCount,selectByPage&pid=7588&qos.enable=false&register.ip=192.168.1.101&release=2.7.5&side=consumer&sticky=false&timestamp=1616666460363 to the consumer 192.168.1.101 use dubbo version 2.7.5

at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:643) ~[spring-beans-5.2.4.RELEASE.jar:5.2.4.RELEASE]

at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:130) ~[spring-beans-5.2.4.RELEASE.jar:5.2.4.RELEASE]

at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399) ~[spring-beans-5.2.4.RELEASE.jar:5.2.4.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1422) ~[spring-beans-5.2.4.RELEASE.jar:5.2.4.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594) ~[spring-beans-5.2.4.RELEASE.jar:5.2.4.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.4.RELEASE.jar:5.2.4.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.4.RELEASE.jar:5.2.4.RELEASE]

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.4.RELEASE.jar:5.2.4.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.4.RELEASE.jar:5.2.4.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.4.RELEASE.jar:5.2.4.RELEASE]

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:879) ~[spring-beans-5.2.4.RELEASE.jar:5.2.4.RELEASE]

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:878) ~[spring-context-5.2.4.RELEASE.jar:5.2.4.RELEASE]

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.2.4.RELEASE.jar:5.2.4.RELEASE]

at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]

at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) [spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]

at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]

at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]

at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]

at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]

at com.ego.ManageApplication.main(ManageApplication.java:10) [classes/:na]

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tbItemParamServiceImpl': Injection of @Reference dependencies is failed; nested exception is java.lang.IllegalStateException: Failed to check the status of the service com.ego.dubbo.service.TbItemParamDubboService. No provider available for the service com.ego.dubbo.service.TbItemParamDubboService from the url zookeeper://192.168.8.128:2181/org.apache.dubbo.registry.RegistryService?application=ego-manage&dubbo=2.0.2&init=false&interface=com.ego.dubbo.service.TbItemParamDubboService&methods=selectCount,selectByPage&pid=7588&qos.enable=false&register.ip=192.168.1.101&release=2.7.5&side=consumer&sticky=false&timestamp=1616666460363 to the consumer 192.168.1.101 use dubbo version 2.7.5

at com.alibaba.spring.beans.factory.annotation.AbstractAnnotationBeanPostProcessor.postProcessPropertyValues(AbstractAnnotationBeanPostProcessor.java:145) ~[spring-context-support-1.0.5.jar:na]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1427) ~[spring-beans-5.2.4.RELEASE.jar:5.2.4.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594) ~[spring-beans-5.2.4.RELEASE.jar:5.2.4.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.4.RELEASE.jar:5.2.4.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.4.RELEASE.jar:5.2.4.RELEASE]

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.4.RELEASE.jar:5.2.4.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.4.RELEASE.jar:5.2.4.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.4.RELEASE.jar:5.2.4.RELEASE]

at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.2.4.RELEASE.jar:5.2.4.RELEASE]

at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1287) ~[spring-beans-5.2.4.RELEASE.jar:5.2.4.RELEASE]

at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1207) ~[spring-beans-5.2.4.RELEASE.jar:5.2.4.RELEASE]

at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640) ~[spring-beans-5.2.4.RELEASE.jar:5.2.4.RELEASE]

... 19 common frames omitted

Caused by: java.lang.IllegalStateException: Failed to check the status of the service com.ego.dubbo.service.TbItemParamDubboService. No provider available for the service com.ego.dubbo.service.TbItemParamDubboService from the url zookeeper://192.168.8.128:2181/org.apache.dubbo.registry.RegistryService?application=ego-manage&dubbo=2.0.2&init=false&interface=com.ego.dubbo.service.TbItemParamDubboService&methods=selectCount,selectByPage&pid=7588&qos.enable=false&register.ip=192.168.1.101&release=2.7.5&side=consumer&sticky=false&timestamp=1616666460363 to the consumer 192.168.1.101 use dubbo version 2.7.5

at org.apache.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:355) ~[dubbo-2.7.5.jar:2.7.5]

at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:266) ~[dubbo-2.7.5.jar:2.7.5]

at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:151) ~[dubbo-2.7.5.jar:2.7.5]

at org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.getOrCreateProxy(ReferenceAnnotationBeanPostProcessor.java:249) ~[dubbo-2.7.5.jar:2.7.5]

at org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.doGetInjectedBean(ReferenceAnnotationBeanPostProcessor.java:142) ~[dubbo-2.7.5.jar:2.7.5]

at com.alibaba.spring.beans.factory.annotation.AbstractAnnotationBeanPostProcessor.getInjectedObject(AbstractAnnotationBeanPostProcessor.java:358) ~[spring-context-support-1.0.5.jar:na]

at com.alibaba.spring.beans.factory.annotation.AbstractAnnotationBeanPostProcessor$AnnotatedFieldElement.inject(AbstractAnnotationBeanPostProcessor.java:538) ~[spring-context-support-1.0.5.jar:na]

at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:130) ~[spring-beans-5.2.4.RELEASE.jar:5.2.4.RELEASE]

at com.alibaba.spring.beans.factory.annotation.AbstractAnnotationBeanPostProcessor.postProcessPropertyValues(AbstractAnnotationBeanPostProcessor.java:141) ~[spring-context-support-1.0.5.jar:na]

... 30 common frames omitted


JAVA 全系列/第十八阶段:亿级高并发电商项目_架构/编码(旧)/电商:基于json数据格式完成商品规格参数模板管理 23530楼
Python 全系列/第十五阶段:Python 爬虫开发/爬虫反反爬- 23531楼

刚刚那个代码,我粘过去好像是乱的,重新粘一下:

public class Test04 {
    public static void main(String[] args) {
        int[] arr = {0,3,1,2,5,4};
        long start = System.currentTimeMillis();
        List repeatNumber = getRepeatNumber1(arr);
        long end = System.currentTimeMillis();
        System.out.println(repeatNumber);
        System.out.println(end-start);

    }


    public static List<Integer> getRepeatNumber1(int[] arr){
        List<Integer> list = new ArrayList<>();

        //判断数组是否为空
        if(arr == null || arr.length == 0){
            list.add(-1);
            return list;
        }

        //通过循环遍历数组中的元素
        for(int i =0;i<arr.length;){
            //判断元素是否合法
            if(arr[i] < 0 || arr[i] >= arr.length){
                list.add(-1);
                return list;
            }

            if(arr[i] == i){
                i++;
            }else {
                if(arr[i] == arr[arr[i]]){
                    if(!list.contains(arr[i])){
                        list.add(arr[i]);
                    }else {
                        i++;
                    }
                } else {
                    int temp = arr[i];
                    arr[i] = arr[arr[i]];
                    arr[temp] = temp;
                }
            }
        }

        if(list.size()==0){
            list.add(-1);
            return list;
        }else {
            return list;
        }
    }


    public static List<Integer> getRepeatNumber2(int[] arr){
        List<Integer> list = new ArrayList();
        for (int i = 0;i<arr.length;i++){
            for (int j = i+1 ;j<arr.length;j++){
                if(arr[i] == arr[j]){
                    if(!list.contains(arr[i])){
                        list.add(arr[i]);
                    }
                    break;
                }
            }
        }
        return list;
    }


}

JAVA 全系列/第二十九阶段:数据结构和算法BATJ大厂面试重难点/线性表 23532楼
JAVA 全系列/第一阶段:JAVA 快速入门/飞机大战小项目训练 23534楼

课程分类

百战程序员微信公众号

百战程序员微信小程序

©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园
网站维护:百战汇智(北京)科技有限公司
京公网安备 11011402011233号    京ICP备18060230号-3    营业执照    经营许可证:京B2-20212637