报错如下:

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写成大写了,跟这报错没有半毛线关系,对新手来说真的太不友好了啊!!!!

所以写代码的时候,特别是这种配置文件的,一定要仔细检查!!!

最新文章

  1. CouchDB简介
  2. visual studio2015使用git管理源代码
  3. 【CMD】日常总结
  4. ionic + cordova 配置和开发过程中的一些问题
  5. [转] Linux下防火墙iptables用法规则详及其防火墙配置
  6. Linux 怎么把自己写的脚本添加到服务里面,即可以使用service命令来调用
  7. hdu 2060
  8. bzoj1406
  9. 调用支付宝接口Android客户端没有支付宝APP的情况下解决无法调用支付宝页面的问题
  10. Android中attr自定义属性详解
  11. Ubuntu常用命令与技巧
  12. IO调度算法研究1
  13. Python正则表达式,统计分析nginx访问日志
  14. b.控制结构
  15. Python模块configparser(操作配置文件ini)
  16. 微软Telnet的回显功能开启
  17. GlusterFS群集存储项目
  18. 关于casperjs的wait方法的执行顺序
  19. android调试debug快捷键
  20. python 继承与多重继承

热门文章

  1. 顺序表的插入和删除(基于c语言)
  2. 《前端运维》一、Linux基础--07Shell函数
  3. MyEclipse 在浏览器运行里报错,The requested resourse (xx/index.jsp) is not available
  4. 如何在MySQL中增加一列
  5. Netty之DefaultAttributeMap与AttributeKey的机制和原理
  6. Mysql学习笔记-临键锁实验
  7. uoj310【UNR #2】黎明前的巧克力(FWT)
  8. AFO以后的机房游记
  9. Zookeeper 的典型应用场景 ?
  10. Hashmap如何同步?