Spring boot 引用alibaba.druid的dataSource启动报错 5C

图片说明

报错信息如图所示,麻烦哪位大拿解释下,怎么还会调用tomcat呐
如果您看不到图片的话,报错信息如下:
Failed to execute goal org.springframework.boot:
spring-boot-maven-plugin:1.5.10.RELEASE:run (default-cli) on project SpringBootDemo:
An exception occurred while running. null: InvocationTargetException:
Error creating bean with name 'dataSource' defined in class path resource
[org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Tomcat.class]:
Bean instantiation via factory method failed;
nested exception is org.springframework.beans.BeanInstantiationException:
Failed to instantiate [org.apache.tomcat.jdbc.pool.DataSource]:
Factory method 'dataSource' threw exception;
nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException:
Cannot determine embedded database driver class for database type NONE.
If you want an embedded database please put a supported one on the classpath.
If you have database settings to be loaded from a particular profile you may need to active it (no profiles are currently active).

7个回答

连接池配置问题,查看项目是否引用了org.apache.tomcat.jdbc.pool.DataSource连接池,并且正确配置。

兄弟,你的图片看不见啊。这怎么帮助你!!

什么也没有,异常不不显示出来,怎么分析啊

跟TOMCAT的数据源冲突

啥都没有 没法回复你啊

你的数据源初始化出问题了,应该是你的数据源配置出问题了吧,好好检查下你的数据源配置

还是配置问题,可以对照这个查看配置:
https://www.jianshu.com/p/170c34bf86a3

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
spring boot 启动报错,找不到DataSource
报错信息如下: 16:39:11.372 1653 [main] WARN o.s.b.c.e.AnnotationConfigEmbeddedWebApplicationContext [AbstractApplicationContext.java:551] - Exception encountered during context initialization - cancellin...
Spring boot 启动报错
Spring boot 启动报错:This application has no explicit mapping for /error, so you are seeing this as a fallback问题原因:按照教程完成spring boot的基础构建的时候,启动报错当时我把服务类 和 启动类放在不同包下,而各自所在包是同级的。解决办法:springboot会自动加载启动类所在包下及...
spring boot启动报错
在spring boot demo中启动报错 ** WARNING ** : Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package. 经过查询得知,启动的类不能放在默认的java! 要建一个包,把application移到此包中 然后新建一个文件夹
Spring Boot启动报错
项目是从外包那边接过来的rn跑了好几天都没问题,昨天晚上突然启动的时候提示这个错误rn[code=java]rnjava.lang.ClassCastException: org.springframework.web.context.support.ServletRequestHandledEvent cannot be cast to org.springframework.boot.web.context.WebServerInitializedEventrn at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:167)rn at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)rn at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:399)rn at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:353)rn at org.springframework.web.servlet.FrameworkServlet.publishRequestHandledEvent(FrameworkServlet.java:1066)rn at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:999)rn at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:856)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:635)rn at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:841)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)rn at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)rn at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)rn at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)rn at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)rn at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799)rn at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)rn at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)rn at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455)rn at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)rn at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)rn at java.lang.Thread.run(Thread.java:748)rn[/code]rn项目在 IDEA下可以跑,就是没次访问都会提示这个,打包到Tomcat就启动不起来,各路大佬求帮
Spring boot启动报错
如果Spring boot启动报错,首先看启动类的名称是否和“SpringbootApplication”重复即注解名称重复可能导致错误的出现。其次Spring boot 希望加载数据源,如果没有在配置文件像 application.yml中配置与数据库相关的连接信息会提示Spring boot启动失败,加载不到数据源等信息。以上内容仅供参考。...
spring Boot微服务启动报错
[img=https://img-bbs.csdn.net/upload/201903/20/1553061955_578458.png][/img][img=https://img-bbs.csdn.net/upload/201903/20/1553061964_215382.png][/img]rnrneclipse启动没问题,在idea里面就报这个错误
(纠错)spring Boot启动报错
Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled. 2017-11-16 15:32:12.994 ERROR 2668 --- [ main] o.s.b.d.LoggingFailureAnalysi...
Spring boot 启动报错求救
启动报错 求解rn```rnError starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.rn2019-01-18 16:46:27.462 ERROR 2312 --- [ main] o.s.boot.SpringApplication : Application run failedrnrnorg.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'apiController': Unsatisfied dependency expressed through field 'apiService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'apiService': Unsatisfied dependency expressed through field 'companyMapper'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'companyMapper' defined in file [F:\javaProjects\app-service\target\classes\com\mapath\bigreward\appservice\mapper\CompanyMapper.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are requiredrn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:596) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]rn at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:374) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1378) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:575) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]rn at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:846) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:863) ~[spring-context-5.1.3.RELEASE.jar:5.1.3.RELEASE]rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546) ~[spring-context-5.1.3.RELEASE.jar:5.1.3.RELEASE]rn at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142) ~[spring-boot-2.1.1.RELEASE.jar:2.1.1.RELEASE]rn at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) [spring-boot-2.1.1.RELEASE.jar:2.1.1.RELEASE]rn at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.1.1.RELEASE.jar:2.1.1.RELEASE]rn at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) [spring-boot-2.1.1.RELEASE.jar:2.1.1.RELEASE]rn at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260) [spring-boot-2.1.1.RELEASE.jar:2.1.1.RELEASE]rn at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248) [spring-boot-2.1.1.RELEASE.jar:2.1.1.RELEASE]rn at com.mapath.bigreward.appservice.AppServiceApplication.main(AppServiceApplication.java:17) [classes/:na]rnCaused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'apiService': Unsatisfied dependency expressed through field 'companyMapper'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'companyMapper' defined in file [F:\javaProjects\app-service\target\classes\com\mapath\bigreward\appservice\mapper\CompanyMapper.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are requiredrn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:596) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]rn at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:374) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1378) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:575) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]rn at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]rn at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:273) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1237) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1164) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:593) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]rn ... 19 common frames omittedrnCaused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'companyMapper' defined in file [F:\javaProjects\app-service\target\classes\com\mapath\bigreward\appservice\mapper\CompanyMapper.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are requiredrn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1745) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:576) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]rn at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]rn at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:273) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1237) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1164) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:593) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]rn ... 32 common frames omittedrnCaused by: java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are requiredrn at org.springframework.util.Assert.notNull(Assert.java:198) ~[spring-core-5.1.3.RELEASE.jar:5.1.3.RELEASE]rn at org.mybatis.spring.support.SqlSessionDaoSupport.checkDaoConfig(SqlSessionDaoSupport.java:74) ~[mybatis-spring-1.3.2.jar:1.3.2]rn at org.mybatis.spring.mapper.MapperFactoryBean.checkDaoConfig(MapperFactoryBean.java:73) ~[mybatis-spring-1.3.2.jar:1.3.2]rn at org.springframework.dao.support.DaoSupport.afterPropertiesSet(DaoSupport.java:44) ~[spring-tx-5.1.3.RELEASE.jar:5.1.3.RELEASE]rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1804) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1741) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]rn ... 42 common frames omittedrnrnDisconnected from the target VM, address: '127.0.0.1:51427', transport: 'socket'rnrnProcess finished with exit code 1rn```
spring Boot项目启动报错如下
java.lang.NoSuchMethodError: org.springframework.beans.factory.annotation.InjectionMetadata.<init>(Ljava/lang/Class;)V原因jar包重复,检查pom文件中是否有重复的jar包
Spring boot 启动报错版本不对
发现session store type使用来存放session的存储方式,目前Spring boot中只支持Redis方式。 由于本应用暂无需将session放入redis的需求,故这里就可以将session store type设置为none. 这里我们将此配置信息放入application.properites之中: spring.session.store-type=none 再次启动,成...
spring boot初学入门-安装启动报错
spring boot启动时候出现Unregistering JMX-exposed beans on shutdown 网上查了下,各有各的解决方案,但自己试了下都不行。只好自己尝试找问题,解决方案: pom.xml里添加 org.apache.tomcat.maven tomcat7-maven-plugin 2.1 8080 UTF-8 t
spring boot项目IDEA启动报错问题解决
IDEA代码编辑器发展很快,现在很多都从Eclipse转到IDEA来了,我就是其中一个,感觉IDEA黑色的主题我感觉很不错 :wink: 好了,下面切入正题 Eclipse启动Spring boot没有报错,为啥IDEA启动就报错,报错提示如下: [code="java"]Caused by: org.springframework.context.ApplicationContextEx...
IDEA开发工具报错----spring boot启动报错
dea启动spring boot项目报错: org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.context.Applica...
转:springboot项目启动报错Failed to configure a DataSource: 'url' attribute is not specified and no embedde
*************************** APPLICATION FAILED TO START *************************** Description: Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could b...
spring boot开发项目,部署到tomcat,启动报错
问题描述: spring boot开发项目,部署到tomcat,启动报错,提示“可能会有内存泄露”。 具体提示信息如下: 解决方式: (1)pom文件加入如下依赖:            dependency> groupId>se.jiderhamngroupId> artifactId>classloader-leak-prev
spring boot 分布式框架 启动报错 怎么解决?
Exception in thread "main" java.lang.IllegalAccessError: tried to access method org.springframework.core.io.support.SpringFactoriesLoader.loadFactoryNames(Ljava/lang/Class;Ljava/lang/ClassLoader;)Ljav...
spring boot 启动报错,求助,可能在线等.......
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'quesTypeController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.china08.yxtiku.service.QuesTypeService com.china08.yxtiku.controller.admin.QuesTypeController.quesTypeService; nested exception is java.lang.IllegalArgumentException: Can not set com.china08.yxtiku.service.QuesTypeService field com.china08.yxtiku.controller.admin.QuesTypeController.quesTypeService to com.sun.proxy.$Proxy101rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1202)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755)rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)rn at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)rn at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:686)rn at org.springframework.boot.SpringApplication.run(SpringApplication.java:320)rn at org.springframework.boot.context.web.SpringBootServletInitializer.run(SpringBootServletInitializer.java:117)rn at org.springframework.boot.context.web.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:108)rn at org.springframework.boot.context.web.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:68)rn at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:175)rn at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5423)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)rn at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)rn at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)rn at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)rn at java.util.concurrent.FutureTask.run(FutureTask.java:166)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)rn at java.lang.Thread.run(Thread.java:724)rnrnrnrn这是错误原因,框架是spring boot 在service 里面使用事务管理@transactional 启动报错,注释掉就没事,看样子就是这个问题,在线等....rnrn还有哪位有jpa 比较好的分页,以及查询,这个用起来真不好用
Spring Boot启动报错ERROR 3644 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
##报错类型:rnrn###Field xxxDao in xxxServiceImpl required a bean of type xxx that could not be found.rnrn详细情况如下:rnrn```javarnrnrn . ____ _ __ _ _rn /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \rn( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \rn \\/ ___)| |_)| | | | | || (_| | ) ) ) )rn ' |____| .__|_| |_|_| |_\__, | / / / /rn =========|_|==============|___/=/_/_/_/rn :: Spring Boot :: (v2.0.2.RELEASE)rnrn2019-07-19 10:45:06.433 INFO 3644 --- [ main] com.meituan.hotel.Application : Starting Application on LAPTOP-2N82SD03 with PID 3644 (E:\CodeCache\IDEA\Webmagic\meituan-crawler-hotel\target\classes started by 三寸旧城七寸执念 in E:\CodeCache\IDEA\Webmagic\meituan-crawler-hotel)rn2019-07-19 10:45:06.435 INFO 3644 --- [ main] com.meituan.hotel.Application : No active profile set, falling back to default profiles: defaultrn2019-07-19 10:45:06.472 INFO 3644 --- [ main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@197d671: startup date [Fri Jul 19 10:45:06 CST 2019]; root of context hierarchyrn2019-07-19 10:45:07.211 INFO 3644 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)rn2019-07-19 10:45:07.229 INFO 3644 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]rn2019-07-19 10:45:07.229 INFO 3644 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.31rn2019-07-19 10:45:07.232 INFO 3644 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : Loaded APR based Apache Tomcat Native library [1.2.21] using APR version [1.6.5].rn2019-07-19 10:45:07.232 INFO 3644 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].rn2019-07-19 10:45:07.232 INFO 3644 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]rn2019-07-19 10:45:07.235 INFO 3644 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : OpenSSL successfully initialized [OpenSSL 1.1.1a 20 Nov 2018]rn2019-07-19 10:45:07.351 INFO 3644 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContextrn2019-07-19 10:45:07.351 INFO 3644 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 882 msrn2019-07-19 10:45:07.459 INFO 3644 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Servlet dispatcherServlet mapped to [/]rn2019-07-19 10:45:07.462 INFO 3644 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]rn2019-07-19 10:45:07.462 INFO 3644 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]rn2019-07-19 10:45:07.462 INFO 3644 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]rn2019-07-19 10:45:07.462 INFO 3644 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]rn2019-07-19 10:45:07.490 WARN 3644 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'hotelInfoServiceImpl': Unsatisfied dependency expressed through field 'hotelInfoDao'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.meituan.hotel.Dao.HotelInfoDao' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: @org.springframework.beans.factory.annotation.Autowired(required=true)rn2019-07-19 10:45:07.492 INFO 3644 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]rn2019-07-19 10:45:07.504 INFO 3644 --- [ main] ConditionEvaluationReportLoggingListener : rnrnError starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.rn2019-07-19 10:45:07.573 ERROR 3644 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter : rnrn***************************rnAPPLICATION FAILED TO STARTrn***************************rnrnDescription:rnrnField hotelInfoDao in com.meituan.hotel.Service.impl.HotelInfoServiceImpl required a bean of type 'com.meituan.hotel.Dao.HotelInfoDao' that could not be found.rnrnrnAction:rnrnConsider defining a bean of type 'com.meituan.hotel.Dao.HotelInfoDao' in your configuration.rnrnrnProcess finished with exit code 1rnrn```rnrnrn### 最近网项目里面加了个模块,模块是基于gradle的工程,我本身的工程是基于maven的,没有导成功,我就把那个模块删除掉了,但是运行就出问题了,网上搜了很多,但是我的注解都加了,而且目录结构也没有问题,Application.class也的确在包的最外层。rnrn## 希望有大佬帮忙解答一下
spring boot用jdbctemplate连接数据库,启动报错
错误信息:rnjava.lang.TypeNotPresentException: Type org.springframework.test.context.ContextConfiguration not presentrn at sun.reflect.annotation.TypeNotPresentExceptionProxy.generateException(TypeNotPresentExceptionProxy.java:46) ~[na:1.8.0_151]rn at sun.reflect.annotation.AnnotationInvocationHandler.invoke(AnnotationInvocationHandler.java:84) ~[na:1.8.0_151]rnjava.lang.ClassNotFoundException: org.springframework.test.context.ContextConfigurationrnrn----------------------------------------------------------------------------------------------------------------------------------------------------------------------------rn代码:rn[b]Application类:[/b]rnpackage com.weibo.dip;rnimport org.springframework.boot.SpringApplication;rnimport org.springframework.boot.test.SpringApplicationConfiguration;rnrn@SpringApplicationConfiguration(Application.class)rnpublic class Application rnrn public static void main(String[] args) rn SpringApplication.run(Application.class);rn rnrnrn[b]Cotroller类:[/b]rnpackage com.weibo.dip.controller;rnrnimport com.weibo.dip.bean.Dataset;rnimport com.weibo.dip.service.DatasetService;rnimport com.weibo.dip.serviceImpl.DatasetServiceImpl;rnimport org.springframework.beans.factory.annotation.Autowired;rnimport org.springframework.boot.autoconfigure.EnableAutoConfiguration;rnimport org.springframework.web.bind.annotation.RequestMapping;rnimport org.springframework.web.bind.annotation.RestController;rnrnimport javax.annotation.Resource;rnrn@RestControllerrn@EnableAutoConfigurationrn@RequestMapping("/demo2")rnpublic class Controller rnrn @Resourcern private DatasetServiceImpl datasetService;rnrn public void setUp() rn // 准备,清空user表rn datasetService.deleteAllUsers();rn rnrn @RequestMapping("/save")rn public void test() throws Exception rn // 插入5个用户rn datasetService.create(1);rn datasetService.create(2);rn datasetService.create(3);rn datasetService.create(4);rn datasetService.create(5);rn rnrn @RequestMapping("/getById")rn public Dataset getById(int id)rn return datasetService.findDatasetById(id);rn rnrn
Spring Boot启动报错找不到Log4j2的实现
Spring Boot启动报错 1. 找不到Log4j2的实现 ERROR StatusLogger Log4j2 could not find a logging implementation ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classp...
spring boot打成war包在tomcat启动报错
公司有个maveni项目很乱,分了几个模块,后来做迁移,用spring boot启动。经过一段时间整理,在本地用spring boot启动已经没问题了,接口页面也都调通了,但是打成war放到tomcat就启动不了。求大神看看rn[img=https://img-bbs.csdn.net/upload/201706/12/1497247898_195215.png][/img]rnrn启动程序和pom.xml文件是这样的rn[img=https://img-bbs.csdn.net/upload/201706/12/1497248472_459903.png][/img]rn[img=https://img-bbs.csdn.net/upload/201706/12/1497248482_539707.png][/img]rn
Eclipse开发的spring boot项目用Idea启动报错
问题1:我想要读取子工程中的resource-files里面的文件,但是在子工程里面输出却是父工程项目,所以提示找不到文件,解决办法:idea打开run/debug configuration ,里面有一个Working directory:将值改成当前需要启动的项目路径即可。 ...
spring boot 2.0多数据源配置后启动报错
  使用了@SpringBootApplication的时候 @SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
Spring boot的dao层继承jpa启动报错
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'xxxController': Unsatisfied dependency expressed through field 'xxxService'; nested exception is org.sp...
spring boot项目启动报错,找不到XXX类
不是很懂csdn如何提问,所以先记录下来,也希望知道解决方案的能给点提示。问题描述:    新建一个spring boot工程,并且有如下项目:    项目一:cust-service,有启动类CustApplication、有依赖一个base服务(base没有application类,是以jar包形式提供一些基础代码)、还有调用一个feign的client服务,还有依赖并调用redis-serv...
【spring boot】 禁用/关闭数据源/DataSource
前言 spring boot 2.0.0.RELEASE maven 3.5 eclipse 4.9.0 用spring boot做程序,不需要连接数据库。该程序一直工作正常。 在某次修改程序后,出现如下提示: *************************** APPLICATION FAILED TO START *************************** Descrip...
spring boot项目启动报DataSource错误
初建一个简单的spring boot 项目,启动后会报错。 Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with n...
Spring Boot 简单配置自定义数据源 DataSource
Spring Boot 已经实现了自动加载 DataSource 的相关配置。我们只需要在项目中引用相关依赖,在配置文件 application.yaml  中配置相关属性即可。相关相关源码入口为  org.springframework.boot.autoconfigure.jdbc 包下的 DataSourceAutoConfiguration 配置类。   (一) Spring Boot...
Spring Boot 引用本地jar包
Spring Boot 的项目常用maven管理jar包,并使用maven将项目打成可部署或运行的包,此篇主要介绍在springboot maven项目中如何将自己本地的jar包添加到项目中。 1、与src平级创建文件夹“lib”(后续直接对该文件夹操作,若读者的文件夹不同,则后续篇幅中直接把lib的位置换成你自己的文件夹就可以了) 2、将本地jar包拷贝到lib目录下
Spring Boot引用本地jar包
最近在做一个项目,需要引入第三方支付包,需要引用本地jar包。这种情况有两种方案可以采用: 一,搭建一个本地maven源,仍然通过maven管理。这种方法的缺点是,一旦工程需要多人维护,每人都需要搭一个本地源,比较麻烦,除非公司有公用的内部maven源,否则这种方案反而增加工作量。 二,以外部jar方式导入本地jar包,然后配置maven的打包参数。这个方式比较灵活...
spring boot 无法引用静态资源
## 0.说明:rn## 在 resource/templates/index.html可以正常引用js。rn## 而在resource/templates/system/sysDept.html中 不能正常引用static静态资源中的jsrnrn------------------------------rn**1.首先上项目结构图:**rnrn![index.html可以正确引用static中的静态文件,而在system目录下,则不能引用到](https://img-ask.csdn.net/upload/201906/28/1561690260_520021.png)rnrn## 2.index.html引用格式和sysDept.html引用一样,故贴出有问题的sysDept.htmlrn**rn![图片说明](https://img-ask.csdn.net/upload/201906/28/1561690562_437755.png)rnrn## **3.我的跳转路径:**rn![图片说明](https://img-ask.csdn.net/upload/201906/28/1561690650_819496.png)rnrn## **4.代码中的处理:**rn![图片说明](https://img-ask.csdn.net/upload/201906/28/1561690817_728154.png)rnrnrn## 5问题来了:rn![图片说明](https://img-ask.csdn.net/upload/201906/28/1561690981_665463.png)rnrn## 6.疑惑点:rn## 在引用静态资源时,为什么会出现我访问的路径 sys/dept2/呢?应该出现这样【http://localhost:8080/css/plugins/jsTree/style.min.css】才是正确的啊,rn故请教大家rn##rnrn# 回答rnrn![添加 ../](https://img-ask.csdn.net/upload/201906/28/1561693917_294483.png)rnrn为什么我的路径中会出现 【sys/dept2/】呢?
Spring Boot之Thymeleaf引用静态资源
方法 Spring Boot在Thymeleaf结构模块很好提供了静态资源的引用方法 th:[href | src]@{资源在static下的目录}, 如:@{lib/jquery.js} 不用填写默认的static文件夹 案例 资源目录结构 templates目录下的ws.html可以这样引用static下的资源文件 <!DOCTYPE html> <htm...
Spring DataSource
rn rn请问spring中配置的dataSource中class=[color=#FF0000][u]"org.apache.commons.dbcp.BasicDataSource[/u]"[/color]红线部分从哪来的呢?哪个包呢?
Spring启动报错
启动报错 Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.   Error starting ApplicationContext. To display the conditions report re-run ...
datasource类型引用求解
在有VB6。0编制控件时利用控件向导生成了一个控件,内设一TEXT及一个控件,其中自动生成了一个属性rn定义为:rnPublic Property Get DataSource() As DataSourcern Set DataSource = DataGrid1.DataSourcernEnd PropertyrnrnPublic Property Set DataSource(ByVal New_DataSource As DataSource)rn Set DataGrid1.DataSource = New_DataSourcern PropertyChanged "DataSource"rnEnd Propertyrn但是在应用时提示rnCompile error:rnuser_defined type not definedrn从此提示来看应是引用中选择不当或是不全,但经反复试仍不见效请教各位大师应如何引用rn
spring Boot jar包工程下引用静态资源
     最近在写一个sprin-boot项目。其中涉及到了PDF跟字体文件的引用。     由于主工程打的是jar包,所以,他不像传统的web项目那样,可以把静态资源放在web-info下面。而我们引用的jar包,给pdf设置水印需要传入引用的路径。     期初在网上查了很多资料,他们jar包下的引用用的是用流引用    如下ClassPathResource classPathResourc...
spring boot 配置文件中参数间的引用
com.july.young.name=扫地君 com.july.young.title=扫地心得 com.july.young.desc=${com.july.young.name}正在努力写《${com.july.young.title}》
spring boot + maven项目引用静态资源404问题
朋友昨天做了一个新的项目,用sring boot+maven聚合项目在web子项目中引用html和.js文件时前台一直报404错误。用到了thymeleaf模板,项目配置文件用的是spring boot 支持的.yml为后缀文件做配置,这里没有做对js或者img或者jsp下的过滤/拦截。下面是项目目录结构yxt 项目  静态资源文件我是放在  src/main/resources/static/j...
spring boot pom引用组件的版本问题
首先说明一下是个新手,做个小程序练练手。碰到一下问题请教一下各位:rn1.pom.xml 的各种依赖是否需要指定版本,如果指定了各段时间就提示pom.xml出错了(尽管能编译通过),但是pom.xml有红色的叉叉rnrn2.但是如果不指定版本,它总是会自动下载最新版本的jar包,好不容易完成工作了,明天编译可能就通不过了,因为新的jar中有些方法类有了变化,要重新改代码。rnrn请问各位老大,正确的方法应该咋整?rnrn现在工程的pom.xml文件如下:rn[code=java]rnrnrnrn 4.0.0rnrn com.examplern demorn 0.0.1-SNAPSHOTrn jarrnrn demorn Demo project for Spring Bootrnrn rn org.springframework.bootrn spring-boot-starter-parentrn 2.0.0.BUILD-SNAPSHOTrn rn rnrn rn UTF-8rn UTF-8rn 1.8rn rnrn rn rn org.springframework.bootrn spring-boot-starter-web rn rn rn org.springframework.bootrn spring-boot-starter-cachern rn rn org.springframework.bootrn spring-boot-starter-data-jparn rnrn rn mysqlrn mysql-connector-javarn runtimern rn rn rn org.springframework.datarn spring-data-releasetrainrn Kay-BUILD-SNAPSHOTrn pomrn importrn rn rn rn com.google.code.gsonrn gsonrn 2.8.1rn rnrn rn rn org.springframework.bootrn spring-boot-starter-testrn testrn rn rn rn org.springframework.boot rn spring-boot-starter-thymeleaf rn rn rn org.jsouprn jsouprn 1.10.1rn rnrn rn org.springframework.bootrn spring-boot-starter-validationrn rn rn rn org.quartz-scheduler rn quartz rn 2.2.3 rn rn rn rn com.oraclern ojdbc7rn 12.1.0.2.0rn rn rn rn javax.mailrn mailrn 1.4.5rn rn rn org.springframework.bootrn spring-boot-configuration-processorrn truern rn rn com.linuxensern javadbfrn 0.4.0 rn rn rn rnrn rn demorn rn rn org.springframework.bootrn spring-boot-maven-pluginrn rn rn rnrn rn rn spring-snapshotsrn Spring Snapshotsrn https://repo.spring.io/snapshotrn rn truern rn rn rn spring-milestonesrn Spring Milestonesrn https://repo.spring.io/milestonern rn falsern rn rn rn rn rn rn spring-snapshotsrn Spring Snapshotsrn https://repo.spring.io/snapshotrn rn truern rn rn rn spring-milestonesrn Spring Milestonesrn https://repo.spring.io/milestonern rn falsern rn rn rn rnrnrnrn[/code]rnrn其中有几个地方提示:rn1.rnrn com.google.code.gsonrn gsonrn 2.8.1rn rnrnDuplicating managed version 2.8.1 for gsonrnrn2.rn rn org.quartz-scheduler rn quartz rn 2.2.3 rn rnrnOverriding managed version 2.3.0 for quartzrnrn3.rnFailure to find org.springframework.boot:spring-boot-maven-plugin:jar:2.0.0.BUILD-20170803.204737-855 in https://repo.spring.io/snapshot was cached in the local repository, resolution will not be reattempted until the update interval of spring-snapshots has elapsed or updates are forcedrnrn4.rnCould not find artifact org.springframework.boot:spring-boot-maven-plugin:jar:2.0.0.BUILD-20170803.204737-855 in spring-snapshots (https://repo.spring.io/snapshot)
Spring boot 引用外部作为静态资源
-
相关热词 c# stream 复制 android c# c#监测窗口句柄 c# md5 引用 c# 判断tabtip 自己写个浏览器程序c# c# 字符串变成整数数组 c#语言编程写出一个方法 c# 转盘抽奖 c#选中treeview