zoukankan      html  css  js  c++  java
  • springboot 启动的时候报错 Error creating bean with name 'solrClient'

    springboot 启动的时候报错:

    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'solrClient' defined in class path resource [org/springframework/boot/autoconfigure/solr/SolrAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.solr.client.solrj.SolrClient]: Factory method 'solrClient' threw exception; nested exception is java.lang.NoSuchMethodError: org.apache.solr.client.solrj.impl.HttpClientUtil.createClient(Lorg/apache/solr/common/params/SolrParams;)Lorg/apache/http/impl/client/CloseableHttpClient;

    在spring boot 中添加  (exclude=SolrAutoConfiguration.class)

    package com;
    
    import org.springframework.boot.SpringApplication;
    import org.springframework.boot.autoconfigure.SpringBootApplication;
    import org.springframework.boot.web.support.SpringBootServletInitializer;
    
    @SpringBootApplication(exclude=SolrAutoConfiguration.class)
    public class Application extends SpringBootServletInitializer {
    
        public static void main(String[] args) {
            SpringApplication.run(Application.class, args);
        }
    
    }
  • 相关阅读:
    利用windows 127.0.0.1:30000 代理在linux下工作
    nginx与ssh 把内网转为公网开发服务器
    php errorlog 记录
    dockerfile php 开发
    ubuntu
    k8s 1.9.1 centos7 install 离线安装
    kubernetes
    linux字符设备驱动--基本知识介绍
    linux应用程序设计--Makefile工程管理
    linux应用程序设计--GDB调试
  • 原文地址:https://www.cnblogs.com/fuyuanming/p/9115875.html
Copyright © 2011-2022 走看看