Java报错:Error creating bean with name 'testController': Injection of resource dependencies failed
报错如下:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testController': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bookRepository' defined in com.sirifeng.testjpa.Mapper.BookRepository defined in @EnableJpaRepositories declared on JpaRepositoriesRegistrar.EnableJpaRepositoriesConfiguration: Cannot resolve reference to bean 'jpaMappingContext' while setting bean property 'mappingContext'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaMappingContext': Invocation of init method failed; nested exception is org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
我吐了,de了两个小时的bug,最后发现是数据库的url的一个参数写错了,我写的
spring.datasource.url=jdbc:mysql://localhost:3306/webstore?useUnicode=true&characterEncoding=utf-8&serverTimeZone=UTC
这里的serverTimeZone,写错了,应该是serverTimezone,Z写成大写了,跟这报错没有半毛线关系,对新手来说真的太不友好了啊!!!!
所以写代码的时候,特别是这种配置文件的,一定要仔细检查!!!
Java报错:Error creating bean with name 'testController': Injection of resource dependencies failed的更多相关文章
- Error creating bean with name 'testController': Injection of resource dependencies failed;
启动ssm项目报错: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 't ...
- 【解决方案】 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userHandler': Injection of resource dependencies failed;
一个错误会浪费好多青春绳命 鉴于此,为了不让大家也走弯路,分享解决方案. [错误代码提示] StandardWrapper.Throwableorg.springframework.beans.fac ...
- Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'fundService': Injection of resource dependencies failed;
在进行SSM的Controller的编写, 从浏览器访问后端Controller的时候遇到了这个问题. 这个问题的描述: 创建Bean的对象失败 错误代码如下: @Service("fund ...
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'supplierAction': Injection of resource dependencies failed; nested exception is org.springframework.beans.factor
这个错误是因为抽象Action类的时候,把ServletContext写成了serverContext,导致无法注入,正确写法是 import javax.annotation.Resource; i ...
- eclipse 启动tomcat报Spring错误 Error creating bean with name 'serviceOrderBiz': Injection of autowired dependencies failed
启动tomcat报异常,提示Sring无法创建serviceOrderBiz(第一行红字),继续看是因为有一个自动注入的字段无法注入ModuleInterfaceBiz(第二行红字),检查servic ...
- Failed to load ApplicationContext ,Error creating bean with name 'adminUserService': Injection of autowired dependencies failed;
Druid配置的时候出现这个问题: "C:\Program Files\Java\jdk1.8.0_191\bin\java" -ea -Didea.test.cyclic.buf ...
- Error creating bean with name 'adminUserController': Injection of autowired dependencies failed;
spring 个坑爹地,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ...
- Error creating bean with name 'signController': Injection of autowired dependencies failed
出现了一大串错误,Error creating bean with name 'signController': Injection of autowired dependencies failed. ...
- Error creating bean with name 'contentCategoryController': Injection of autowired dependencies failed;
在springmvc.spring.mybatis搭建的工程中出现了一大串错误 查了代码后发现,原来是在ContentCategoryServiceImpl中忘了写一句话@Service(),以至于因 ...
随机推荐
- 同步a表的数据到 b表
//同步a表的数据到 b表UPDATE a t1 JOIN b t2 ON t1.finance_id = t2.idSET t1.a_id = t2.a_id,t1.b_name = t2.b_na ...
- Navicat v15 破解
特别注意: 1.断网,否则在安装过程中会失败 2.关闭防火墙及杀毒软件 3.选择对应版本:mysql版就选择mysql 4.如果出现 就卸载,删除注册表,重新安装,出现rsa public key n ...
- cURL error 60: SSL certificate problem: unable to get local issuer certifica 解决
从 https://curl.haxx.se/docs/caextract.html 上下载cacert.pem 打开php.ini 搜索curl.cainfo 与 openssl.cafile,将 ...
- clang的线程安全分析模块 thread safety analysis
介绍 Clang的线程安全分析模块是C++语言的一个扩展,能对代码中潜在的竞争条件进行警告.这种分析是完全静态的(即编译时进行),没有运行时的消耗.当前这个功能还在开发中,但它已经具备了足够的成熟度, ...
- Netty学习(三)高性能之ByteBuf源码解析
原文链接: https://juejin.im/post/5db8ea506fb9a02061399ab3 Netty 的 ByteBuf 类型 Pooled(池化).Unpooled(非池化) Di ...
- 04 变量 变量作用域 常量final 变量的命名规范
变量 变量是什么:就是可以变化的量! Java是一种强类型语言,每个变量都必须声明其类型. Java变量是程序中最基本的存储单元,其要素包括变量名,变量类型和作用域. 注意事项: 每个变量都有类型,类 ...
- 详解Nacos 配置中心客户端配置缓存动态更新的源码实现
Nacos 作为配置中心,当应用程序去访问Nacos动态获取配置源之后,会缓存到本地内存以及磁盘中. 由于Nacos作为动态配置中心,意味着后续配置变更之后需要让所有相关的客户端感知,并更新本地内存! ...
- ng-messages AngularJs 表单校验方式
最新研究了一下表单校验,直接上代码. <!DOCTYPE html><html ng-app='app'><head> <meta charset=" ...
- 一文让你明白CPU上下文切换
我们都知道,Linux 是一个多任务操作系统,它支持远大于 CPU 数量的任务同时运行.当然,这些任务实际上并不是真的在同时运行,而是因为系统在很短的时间内,将 CPU 轮流分配给它们,造成多任务同时 ...
- .Net core Api后台获取数据,异步方法中,数据需采用Linq分页
.net core api using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressi ...