1.问题
springboot启动报错
"D:Program FilesJavajdk-11injava.exe" -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true "-javaagent:D:Program FilesJetBrainsIntelliJ IDEA 2019.1.2libidea_rt.jar=59473:D:Program FilesJetBrainsIntelliJ IDEA 2019.1.2in" -Dfile.encoding=UTF-8 -classpath D:workroomMydemoSpringoutproductionclasses;D:workroomMydemoSpringoutproduction
esources;C:Usersadmin.gradlecachesmodules-2files-2.1org.springframework.bootspring-boot-starter-web2.3.0.RELEASE459a5d406c56770d9616c5b272bae9fbc777a994spring-boot-starter-web-2.3.0.RELEASE.jar;C:Usersadmin.gradlecachesmodules-2files-2.1org.mybatis.spring.bootmybatis-spring-boot-starter2.1.2724ae339bf7d1087612c7186133ed9701f103dddmybatis-spring-boot-starter-2.1.2.jar;C:Usersadmin.gradlecachesmodules-2files-2.1org.springframework.bootspring-boot-starter-json2.3.0.RELEASEdfdd3336ee920e4bc75f4ed726c3894c7821c31bspring-boot-starter-json-2.3.0.RELEASE.jar;C:Usersadmin.gradlecachesmodules-2files-2.1org.springframework.bootspring-boot-starter-jdbc2.3.0.RELEASEddc9ee3da589998143de4cada9d5e3aa1dc39f83spring-boot-starter-jdbc-2.3.0.RELEASE.jar;C:Usersadmin.gradlecachesmodules-2files-2.1org.springframework.bootspring-boot-starter2.3.0.RELEASE7b65ef478cf4d21ec70432e11055c2c83371b305spring-boot-starter-2.3.0.RELEASE.jar;C:Usersadmin.gradlecachesmodules-2files-2.1org.springframework.bootspring-boot-starter-tomcat2.3.0.RELEASEa8038c9ce2beb7bd3c1980ecadd79f65f36d9311spring-boot-starter-tomcat-2.3.0.RELEASE.jar;C:Usersadmin.gradlecachesmodules-2files-2.1org.mybatis.spring.bootmybatis-spring-boot-autoconfigure2.1.2f322930f6a0d07c78481853e6625ffb779bcdeb7mybatis-spring-boot-autoconfigure-2.1.2.jar;C:Usersadmin.gradlecachesmodules-2files-2.1org.springframework.bootspring-boot-autoconfigure2.3.0.RELEASE63e909ec18045377f5bcbedbf29f54691dc54ba0spring-boot-autoconfigure-2.3.0.RELEASE.jar;C:Usersadmin.gradlecachesmodules-2files-2.1org.springframework.bootspring-boot2.3.0.RELEASE52fabd810811f5352ebf6a0a7049550f7d4ec1b9spring-boot-2.3.0.RELEASE.jar;C:Usersadmin.gradlecachesmodules-2files-2.1org.springframework.bootspring-boot-starter-logging2.3.0.RELEASEfe2b3809c5763dd7fe02ab174ebe5ee9ed708fbespring-boot-starter-logging-2.3.0.RELEASE.jar;C:Usersadmin.gradlecachesmodules-2files-2.1org.springframeworkspring-webmvc5.2.6.RELEASEfc54ea95c4c96cd0ab5272319905d4da5d632383spring-webmvc-5.2.6.RELEASE.jar;C:Usersadmin.gradlecachesmodules-2files-2.1org.springframework.bootspring-boot-devtools2.3.0.RELEASEe13dced857910467ff468bba0656a3857deda524spring-boot-devtools-2.3.0.RELEASE.jar;C:Usersadmin.gradlecachesmodules-2files-2.1org.springframeworkspring-web5.2.6.RELEASE8cc2dbd266eb8f02d2df0895c8e887269e8aed88spring-web-5.2.6.RELEASE.jar;C:Usersadmin.gradlecachesmodules-2files-2.1org.mybatismybatis3.5.483853443357d61258d2634758079f355a0db69eemybatis-3.5.4.jar;C:Usersadmin.gradlecachesmodules-2files-2.1org.mybatismybatis-spring2.0.43771548c4d9f78789be33bed01f42d6592757fe1mybatis-spring-2.0.4.jar;C:Usersadmin.gradlecachesmodules-2files-2.1com.fasterxml.jackson.datatypejackson-datatype-jsr3102.11.0168b2d0e11478b9f0a1bfccd62d6b5e8547b1e6fjackson-datatype-jsr310-2.11.0.jar;C:Usersadmin.gradlecachesmodules-2files-2.1com.fasterxml.jackson.corejackson-annotations2.11.0c626020ae55d19c690d25cb51c1532ba76e5890fjackson-annotations-2.11.0.jar;C:Usersadmin.gradlecachesmodules-2files-2.1com.fasterxml.jackson.datatypejackson-datatype-jdk82.11.0cca91d6375258fd7ff2a6abb7bf91eef492bd606jackson-datatype-jdk8-2.11.0.jar;C:Usersadmin.gradlecachesmodules-2files-2.1com.fasterxml.jackson.modulejackson-module-parameter-names2.11.0950a1e9a7c1093e7ffd92b216d5a0667f1e39058jackson-module-parameter-names-2.11.0.jar;C:Usersadmin.gradlecachesmodules-2files-2.1com.fasterxml.jackson.corejackson-core2.11.0f84302e14648f9f63c0c73951054aeb2ff0b810ajackson-core-2.11.0.jar;C:Usersadmin.gradlecachesmodules-2files-2.1com.fasterxml.jackson.corejackson-databind2.11.08f5aaf3878b0647ff3a16610af53b1a5c05d9f15jackson-databind-2.11.0.jar;C:Usersadmin.gradlecachesmodules-2files-2.1org.apache.logging.log4jlog4j-to-slf4j2.13.27e2845170ed4fdeb87f1fdc9131b743c61645da3log4j-to-slf4j-2.13.2.jar;C:Usersadmin.gradlecachesmodules-2files-2.1org.apache.logging.log4jlog4j-api2.13.2567ea514dedd8679c429c5b5b39b0d67b6464c3clog4j-api-2.13.2.jar;C:Usersadmin.gradlecachesmodules-2files-2.1org.springframeworkspring-context5.2.6.RELEASEf8f4420f268b054db12bf0dc7128adc09ab39a7spring-context-5.2.6.RELEASE.jar;C:Usersadmin.gradlecachesmodules-2files-2.1org.springframeworkspring-aop5.2.6.RELEASE84fffb7cad5816763683a3f251f942aa9f667a7espring-aop-5.2.6.RELEASE.jar;C:Usersadmin.gradlecachesmodules-2files-2.1org.springframeworkspring-jdbc5.2.6.RELEASE43747a50376e662c2d889ce7b3cd5b9204962ff3spring-jdbc-5.2.6.RELEASE.jar;C:Usersadmin.gradlecachesmodules-2files-2.1org.springframeworkspring-tx5.2.6.RELEASE965726c96c42025eedeec047c2afad884203145aspring-tx-5.2.6.RELEASE.jar;C:Usersadmin.gradlecachesmodules-2files-2.1org.springframeworkspring-beans5.2.6.RELEASEd1b4c338e52dac001a48e29a605bb8f73572ad84spring-beans-5.2.6.RELEASE.jar;C:Usersadmin.gradlecachesmodules-2files-2.1org.springframeworkspring-expression5.2.6.RELEASEae0bc9fdf6cf08d885b9aee26c21efa24245d46cspring-expression-5.2.6.RELEASE.jar;C:Usersadmin.gradlecachesmodules-2files-2.1org.springframeworkspring-core5.2.6.RELEASE5533695a01f5a1163428932abf6c5ba70e837a2dspring-core-5.2.6.RELEASE.jar;C:Usersadmin.gradlecachesmodules-2files-2.1org.springframeworkspring-jcl5.2.6.RELEASE47b092c5c7a97ad330ae29d84d64e42c63a11b7aspring-jcl-5.2.6.RELEASE.jar;C:Usersadmin.gradlecachesmodules-2files-2.1org.glassfishjakarta.el3.0.3dab46ee1ee23f7197c13d7c40fce14817c9017dfjakarta.el-3.0.3.jar;C:Usersadmin.gradlecachesmodules-2files-2.1com.zaxxerHikariCP3.4.5aa1a2c00aae8e4ba8308e19940711bb9525b103dHikariCP-3.4.5.jar;C:Usersadmin.gradlecachesmodules-2files-2.1jakarta.annotationjakarta.annotation-api1.3.559eb84ee0d616332ff44aba065f3888cf002cd2djakarta.annotation-api-1.3.5.jar;C:Usersadmin.gradlecachesmodules-2files-2.1ch.qos.logbacklogback-classic1.2.37c4f3c474fb2c041d8028740440937705ebb473alogback-classic-1.2.3.jar;C:Usersadmin.gradlecachesmodules-2files-2.1ch.qos.logbacklogback-core1.2.3864344400c3d4d92dfeb0a305dc87d953677c03clogback-core-1.2.3.jar;C:Usersadmin.gradlecachesmodules-2files-2.1org.slf4jjul-to-slf4j1.7.30d58bebff8cbf70ff52b59208586095f467656c30jul-to-slf4j-1.7.30.jar;C:Usersadmin.gradlecachesmodules-2files-2.1org.slf4jslf4j-api1.7.305a4b6d16ab13e34a88fae84c35cd5d68cac922cslf4j-api-1.7.30.jar;C:Usersadmin.gradlecachesmodules-2files-2.1org.yamlsnakeyaml1.26a78a8747147d2c5807683e76ec2b633e95c14fe9snakeyaml-1.26.jar;C:Usersadmin.gradlecachesmodules-2files-2.1org.projectlomboklombok1.18.1248e4e5d60309ebd833bc528dcf77668eab3cd72clombok-1.18.12.jar;C:Usersadmin.gradlecachesmodules-2files-2.1org.apache.tomcat.embed omcat-embed-websocket9.0.3562ab2d7d7d029ea728ea8f8d3151ba93882b52ca omcat-embed-websocket-9.0.35.jar;C:Usersadmin.gradlecachesmodules-2files-2.1org.apache.tomcat.embed omcat-embed-core9.0.358a99064fce4b152a7dc9bea1798ba828a2cecf0f omcat-embed-core-9.0.35.jar com.example.demo.DemoApplication
. ____ _ __ _ _
/\ / ___'_ __ _ _(_)_ __ __ _
( ( )\___ | '_ | '_| | '_ / _` |
\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.3.0.RELEASE)
2020-05-29 09:42:41.536 INFO 6888 --- [ restartedMain] com.example.demo.DemoApplication : Starting DemoApplication on A01 with PID 6888 (D:workroomMydemoSpringoutproductionclasses started by admin in D:workroomMydemoSpring)
2020-05-29 09:42:41.540 INFO 6888 --- [ restartedMain] com.example.demo.DemoApplication : No active profile set, falling back to default profiles: default
2020-05-29 09:42:41.592 INFO 6888 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2020-05-29 09:42:41.593 INFO 6888 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
2020-05-29 09:42:42.120 WARN 6888 --- [ restartedMain] o.m.s.mapper.ClassPathMapperScanner : No MyBatis mapper was found in '[com.example.demo]' package. Please check your configuration.
2020-05-29 09:42:42.453 INFO 6888 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2020-05-29 09:42:42.461 INFO 6888 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2020-05-29 09:42:42.461 INFO 6888 --- [ restartedMain] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.35]
2020-05-29 09:42:42.529 INFO 6888 --- [ restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2020-05-29 09:42:42.529 INFO 6888 --- [ restartedMain] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 936 ms
2020-05-29 09:42:42.665 INFO 6888 --- [ restartedMain] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2020-05-29 09:42:42.753 WARN 6888 --- [ restartedMain] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver class
2020-05-29 09:42:42.753 INFO 6888 --- [ restartedMain] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor'
2020-05-29 09:42:42.755 INFO 6888 --- [ restartedMain] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2020-05-29 09:42:42.766 INFO 6888 --- [ restartedMain] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2020-05-29 09:42:42.769 ERROR 6888 --- [ restartedMain] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
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).
2020-05-29 09:42:42.780 WARN 6888 --- [ restartedMain] 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:603) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:409) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.context.event.AbstractApplicationEventMulticaster.retrieveApplicationListeners(AbstractApplicationEventMulticaster.java:245) ~[spring-context-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.context.event.AbstractApplicationEventMulticaster.getApplicationListeners(AbstractApplicationEventMulticaster.java:197) ~[spring-context-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:134) ~[spring-context-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:403) ~[spring-context-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:360) ~[spring-context-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.boot.availability.AvailabilityChangeEvent.publish(AvailabilityChangeEvent.java:81) ~[spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
at org.springframework.boot.availability.AvailabilityChangeEvent.publish(AvailabilityChangeEvent.java:67) ~[spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.doClose(ServletWebServerApplicationContext.java:167) ~[spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:978) ~[spring-context-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:814) ~[spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:325) ~[spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237) ~[spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) ~[spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
at com.example.demo.DemoApplication.main(DemoApplication.java:12) ~[classes/:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) ~[spring-boot-devtools-2.3.0.RELEASE.jar:2.3.0.RELEASE]
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:603) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:409) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.aop.framework.autoproxy.BeanFactoryAdvisorRetrievalHelper.findAdvisorBeans(BeanFactoryAdvisorRetrievalHelper.java:91) ~[spring-aop-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findCandidateAdvisors(AbstractAdvisorAutoProxyCreator.java:109) ~[spring-aop-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findEligibleAdvisors(AbstractAdvisorAutoProxyCreator.java:94) ~[spring-aop-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.getAdvicesAndAdvisorsForBean(AbstractAdvisorAutoProxyCreator.java:76) ~[spring-aop-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:347) ~[spring-aop-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:299) ~[spring-aop-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:431) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
... 33 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:814) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1282) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:297) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.context.annotation.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor.postProcessBeforeInitialization(ConfigurationClassPostProcessor.java:456) ~[spring-context-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:416) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1788) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
... 56 common frames omitted
Process finished with exit code 0
2.解决方案
认证看错误提示
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).
该错可能是由于没有配置数据库相关信息,如果项目不需要配置数据库可以在启动类上加:
(exclude = {DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class})
完美!