zoukankan      html  css  js  c++  java
  • 吴裕雄--天生自然--SpringBoot开发实战学习笔记--处理Error creating bean with name 'springApplicationAdminRegistrar' defined in class path resource

    这个类是springboot自动化配置的一个jar下面,也就是SpringApplicationAdminJmxAutoConfiguration的一个方法,也就是springboot自动加载bean的一个过程,所以可以得出,我再项目启动的时候,这个bean无法创建
    这个解决办法只是很多办法中的一个解决办法,在springboot项目启动的地方加上包扫描来让整个项目在启动的时候直接交给spring容器来进行自动化配置
    
    import org.springframework.context.annotation.ComponentScan;
    @ComponentScan
    package hello;
    
    import org.springframework.boot.SpringApplication;  
    import org.springframework.boot.autoconfigure.SpringBootApplication; 
    import org.springframework.context.annotation.ComponentScan;
    
    /** 
     * 注解@SpringBootApplication指定项目为springboot,由此类当作程序入口,自动装配 web 依赖的环境; 
     * @author admin 
     * 
     */  
    @SpringBootApplication 
    @ComponentScan
    public class Application {  
        // 在main方法中启动一个应用,即:这个应用的入口  
        public static void main(String[] args) {  
            // TODO Auto-generated method stub  
            SpringApplication.run(Application.class, args);  
        }  
    } 
  • 相关阅读:
    React+Redux仿Web追书神器
    关于贝塞尔曲线的故事
    420小时学习代码之后:如何教你免费自学Python
    学问Chat UI(3)
    学问Chat UI(1)
    Binder进程间通信详解
    Handler源码分析
    学问Chat UI(4)
    WebPack错误集
    React问题集序
  • 原文地址:https://www.cnblogs.com/tszr/p/15143375.html
Copyright © 2011-2022 走看看