idea 启动官网spring boot demo 报错
***************************
APPLICATION FAILED TO START
*************************** Description: Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured. Reason: Failed to determine a suitable driver class Action: Consider the following:
If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active). -- ::02.649 WARN --- [ main] o.s.boot.SpringApplication : Unable to close ApplicationContext org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.autoconfigure.admin.SpringApplicationAdminJmxAutoConfiguration': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration': Initialization of bean failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importRegistry' available
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:) ~[spring-beans-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:) ~[spring-beans-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$(AbstractBeanFactory.java:) ~[spring-beans-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:) ~[spring-beans-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:) ~[spring-beans-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:) ~[spring-beans-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:) ~[spring-beans-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:) ~[spring-beans-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:) ~[spring-beans-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:) ~[spring-beans-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:) ~[spring-beans-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$(AbstractBeanFactory.java:) ~[spring-beans-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:) ~[spring-beans-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:) ~[spring-beans-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:) ~[spring-beans-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.context.event.AbstractApplicationEventMulticaster.retrieveApplicationListeners(AbstractApplicationEventMulticaster.java:) ~[spring-context-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.context.event.AbstractApplicationEventMulticaster.getApplicationListeners(AbstractApplicationEventMulticaster.java:) ~[spring-context-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:) ~[spring-context-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:) ~[spring-context-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:) ~[spring-context-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.boot.availability.AvailabilityChangeEvent.publish(AvailabilityChangeEvent.java:) ~[spring-boot-2.3..RELEASE.jar:2.3..RELEASE]
at org.springframework.boot.availability.AvailabilityChangeEvent.publish(AvailabilityChangeEvent.java:) ~[spring-boot-2.3..RELEASE.jar:2.3..RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.doClose(ServletWebServerApplicationContext.java:) ~[spring-boot-2.3..RELEASE.jar:2.3..RELEASE]
at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:) ~[spring-context-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:) [spring-boot-2.3..RELEASE.jar:2.3..RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:) [spring-boot-2.3..RELEASE.jar:2.3..RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:) [spring-boot-2.3..RELEASE.jar:2.3..RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:) [spring-boot-2.3..RELEASE.jar:2.3..RELEASE]
at com.example.demo.DemoApplication.main(DemoApplication.java:) [classes/:na]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration': Initialization of bean failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importRegistry' available
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:) ~[spring-beans-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:) ~[spring-beans-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$(AbstractBeanFactory.java:) ~[spring-beans-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:) ~[spring-beans-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:) ~[spring-beans-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:) ~[spring-beans-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:) ~[spring-beans-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:) ~[spring-beans-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:) ~[spring-beans-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:) ~[spring-beans-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:) ~[spring-beans-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$(AbstractBeanFactory.java:) ~[spring-beans-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:) ~[spring-beans-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:) ~[spring-beans-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:) ~[spring-beans-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.aop.framework.autoproxy.BeanFactoryAdvisorRetrievalHelper.findAdvisorBeans(BeanFactoryAdvisorRetrievalHelper.java:) ~[spring-aop-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findCandidateAdvisors(AbstractAdvisorAutoProxyCreator.java:) ~[spring-aop-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findEligibleAdvisors(AbstractAdvisorAutoProxyCreator.java:) ~[spring-aop-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.getAdvicesAndAdvisorsForBean(AbstractAdvisorAutoProxyCreator.java:) ~[spring-aop-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:) ~[spring-aop-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:) ~[spring-aop-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:) ~[spring-beans-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:) ~[spring-beans-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:) ~[spring-beans-5.2..RELEASE.jar:5.2..RELEASE]
... common frames omitted
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importRegistry' available
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:) ~[spring-beans-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:) ~[spring-beans-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:) ~[spring-beans-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:) ~[spring-beans-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.context.annotation.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor.postProcessBeforeInitialization(ConfigurationClassPostProcessor.java:) ~[spring-context-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:) ~[spring-beans-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:) ~[spring-beans-5.2..RELEASE.jar:5.2..RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:) ~[spring-beans-5.2..RELEASE.jar:5.2..RELEASE]
... common frames omitted Process finished with exit code
【原因】
没有配置数据库连接字符串导致
【解决】
程序入口处添加【exclude = {DataSourceAutoConfiguration.class }】如下所示,然后再运行就可以了。
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class })
public class DemoApplication {
    public static void main(String[] args) {
        SpringApplication.run(DemoApplication.class, args);
    }
}
(完)
idea 启动官网spring boot demo 报错的更多相关文章
- 启动Spring boot项目报错:java.lang.IllegalArgumentException: LoggerFactory is not a Logback
		
java.lang.IllegalArgumentException: LoggerFactory is not a Logback LoggerContext but Logback is on t ...
 - [Java]Java 9运行Spring Boot项目报错的解决办法
		
简介 为了学习和尽快掌握 Java 9 的模块化(Module System)新特性,最近安装了 JDK 9,新建了一个 Spring Boot 进行尝试, 过程中遇到了一下报错问题,写下此文谨作为个 ...
 - spring boot+mybatis报错mapper无法注入
		
搭建spring boot项目时启动出现的问题,先来看异常片段: Error starting ApplicationContext. To display the conditions report ...
 - Intellij Idea上Spring Boot编译报错:Error:(3, 32) java: 程序包org.springframework.boot不存在
		
很尴尬,为了使用Spring Boot的Initializr,特意下了个Intellij Idea,刚按提示新建一个Spring Boot的Maven项目后,就出现红叉叉了.因为IDE是新的,开始是M ...
 - spring boot 打包报错
		
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.3.0.RELEASE:repac ...
 - 创建Spring boot project报错:Project build error: Non-resolvable parent POM for xxx:0.0.1-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent
		
刚开始创建Spring boot项目时,pom.xml文件时报如下图错误: 在网上百度的说让更新下Maven的update project,我试了没用,最后将version版本改了就行了,我原来版本是 ...
 - spring boot aop 报错
		
1.控制台报错 Pointcut is not well-formed: expecting 'name pattern' at character position 33 execution(com ...
 - Spring Boot单元测试报错java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]
		
1 报错描述 java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]. Specify @Boot ...
 - spring boot + thymeleaf 报错 org.thymeleaf.exceptions.TemplateInputException
		
org.thymeleaf.exceptions.TemplateInputException: Error resolving template "admin/verifyPassword ...
 
随机推荐
- Java实现 LeetCode 7整数反转
			
7. 整数反转 给出一个 32 位的有符号整数,你需要将这个整数中每位上的数字进行反转. 示例 1: 输入: 123 输出: 321 示例 2: 输入: -123 输出: -321 示例 3: 输入: ...
 - Java实现第八届蓝桥杯包子凑数
			
包子凑数 题目描述 小明几乎每天早晨都会在一家包子铺吃早餐.他发现这家包子铺有N种蒸笼,其中第i种蒸笼恰好能放Ai个包子.每种蒸笼都有非常多笼,可以认为是无限笼. 每当有顾客想买X个包子,卖包子的大叔 ...
 - 支持MMDVM的DMR手台
			
只要是数字机,都支持,但是,有便宜又好用的吗?当然有,店主做那么久肯定知道哪些机好用 1.MD760(UV双段) 刷固件支持#切换不同的TG,可以手动改机子的DMR ID,可以下载联系人,可以升级!关 ...
 - syslog客户端java实现
			
//package com.tony.util; import java.io.*; import java.net.*; /** * UDP客户端程序,用于对服务端发送数据,并接收服务端的回应信息. ...
 - RocketMQ系列(二)环境搭建
			
RocketMQ的基本概念在上一篇中给大家介绍了,这一节将给大家介绍环境搭建.RocketMQ中最基础的就是NameServer,我们先来看看它是怎么搭建的. NameServer RocketMQ要 ...
 - 源码分析(2)-LinkedHashMap(JDK1.8)
			
1.概述 LinkedHashMap继承自HashMap:在HashMap基础上,通过维护一条双向链表,解决了HashMap键值对遍历顺序和插入顺序一致的问题. 想了解LinkedHashMap源码, ...
 - 小菜成长之路,警惕沦为 API 调用侠
			
小菜(化名)在某互联网公司担任运维工程师,负责公司后台业务的运维保障工作.由于自己编程经验不多,平时有不少工作需要开发协助. 听说 Python 很火,能快速开发一些运维脚本,小菜也加入 Python ...
 - controller介绍
			
Loadrunner Controller可以使用Loadrunner Controller管理和维护方案可以从一个单一的控制点简单有效的控制所有的Vuser 承担着多种工作任务.最常见的就是场景的设 ...
 - windbg分析一次大查询导致的内存暴涨
			
项目上反馈了一个问题,就是在生产环境上,用户正常使用的过程中,出现了服务器内存突然暴涨,客户有点慌,想找下原因. 讲道理,内存如果是缓慢上涨一直不释放的话,应该是存在内存泄漏的,这种排查起来比较困难, ...
 - 基于flask框架的高校舆情分析系统
			
系统分析: 高校舆情分析拟实现如下功能,采集微博.贴吧.学校官网的舆情信息,对这些舆情进行数据分析.情感分析,提取关键词,生成词云分析,情感分析图,实时监测舆情动态. 系统设计: 前端:采用layui ...