无法解析db.properties,spring报错:Caused by: java.sql.SQLException: unkow jdbc driver : ${url}

时间:2022-10-20 19:50:21

db.properties中配置了url等jdbc连接属性:

driver=org.sqlite.JDBC
url=jdbc:sqlite:D:/xxx/data/sqliteDB/demo.db
username=
password=

spring的applicationContext.xml中配置数据源引用这些属性,但遗憾的是,运行报错了:

Caused by: java.sql.SQLException: unkow jdbc driver : ${url}

无法解析db.properties,spring报错:Caused by: java.sql.SQLException: unkow jdbc driver : ${url}

解决方案:

把MapperScannerConfigurer节那个bean的sqlSessionFactory属性

<property name="sqlSessionFactory" ref="sqlSessionFactory" />

改成:<property name="sqlSessionFactoryBeanName" value="sqlSessionFactory" />

无法解析db.properties,spring报错:Caused by: java.sql.SQLException: unkow jdbc driver : ${url}

无法解析db.properties,spring报错:Caused by: java.sql.SQLException: unkow jdbc driver : ${url}的更多相关文章

  1. MySQL报错:Cause&colon; java&period;sql&period;SQLException&colon; Incorrect string value&colon; &&num;39&semi;&bsol;xE6&bsol;x9D&bsol;xA8&quot&semi;&comma;&quot&semi;&period;&period;&period;&&num;39&semi; for column &&num;39&semi;obj&lowbar;value&&num;39&semi; at row 1

    1.插入MySQL表时,报错:Cause: java.sql.SQLException: Incorrect string value: '\xE6\x9D\xA8","...' ...

  2. mysql报错:Cause&colon; java&period;sql&period;SQLException&colon; sql injection violation&comma; syntax error&colon; ERROR&period; pos 39&comma; line 2&comma; column 24&comma; token CLOSE

    因为close是mysql关键字 -- ::, DEBUG (BaseJdbcLogger.java:)- ==> Preparing: , -- ::, INFO (XmlBeanDefini ...

  3. 解决sqoop导入报错:Caused by&colon; java&period;sql&period;SQLException&colon; Protocol violation

    报错信息: -- ::, INFO [main] org.apache.hadoop.mapred.MapTask: Ignoring exception during close for org.a ...

  4. Hibernate报错:Caused by&colon; java&period;sql&period;SQLException&colon; Field &&num;39&semi;ID&&num;39&semi; doesn&&num;39&semi;t have a default value

    问题一: 报错如下: org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assig ...

  5. Caused by&colon; java&period;sql&period;SQLException&colon; Field &&num;39&semi;category&lowbar;id&&num;39&semi; doesn&&num;39&semi;t have a default value

    ### The error may involve com.qingmu.core.dao.ad.ContentDao.insertSelective-Inline ### The error occ ...

  6. Caused by&colon; java&period;sql&period;SQLException&colon; Couldn&&num;39&semi;t perform the operation getAutoCommit&colon; You can&&num;39&semi;t perform any operations on this connection&period; It has been automatically closed by Proxool for some reason &lpar;see lo

    系统启动,一段时间不操作,然后在来操作时,报错如下: Caused by: java.sql.SQLException: Couldn't perform the operation getAutoC ...

  7. Caused by&colon; java&period;sql&period;SQLException&colon; ResultSet is from UPDATE&period; No Data&period;

    1.错误描述 org.hibernate.exception.GenericJDBCException: error executing work at org.hibernate.exception ...

  8. Caused by&colon; java&period;sql&period;SQLException&colon; Failed to start database &&num;39&semi;metastore&lowbar;db&&num;39&semi; with class loader org&period;apache&period;spark&period;sql&period;hive&period;client&period;IsolatedClientLoader&dollar;&dollar;anon&dollar;1&commat;d7c365&comma; see the next exception for details&period;

    解决方法:https://*.com/questions/37442910/spark-shell-startup-errors 异常: 18/01/29 19:04:27 W ...

  9. Caused by&colon; java&period;sql&period;SQLException&colon; Field &&num;39&semi;id&&num;39&semi; doesn&&num;39&semi;t have a default value

    1.错误描述 org.hibernate.exception.GenericJDBCException: error executing work at org.hibernate.exception ...

随机推荐

  1. Python笔记总结week8

    面向对象第二节 要点: 1. 封装,对象中嵌套对象 2. pickle,load,切记,一定要先导入相关的类 回顾上一节: 面向对象三大特性: 封装.继承.多态(多种类型.多种形态) 关于多态,任意参 ...

  2. Gradle tip &num;3&colon; Tasks ordering

    I noticed that the quite often problem I face when I work with Gradle - is tasks ordering (either ex ...

  3. OO之美

    ㈠ 设计的分寸 对于设计,还有很多看似"惯常"的法则与经验广泛存在于软件系统中,例如除了经典的23种设计设计模式.还有很多模式之外的模式,按照粒度的大小,系统的特点,规模的大小,而 ...

  4. C&plus;&plus;字符串和string类介绍

    一.C风格字符串 ◆ 1.字符串是用字符型数组存储的,字符串要求其尾部以'\0'作为结束标志.如:    char string[ ]="C++ programming language&q ...

  5. 【字符串】【最小表示法】Vijos P1683 有根树的同构问题

    题目链接: https://vijos.org/p/1683 题目大意: 给M棵树,每棵N个点,N-1条边,树边有向,问哪些树同构. 题目思路: [字符串][最小表示法] 用()表示一个节点,那么三个 ...

  6. package&period;json配置项

    以下示例列举了常用的地方,一些不常用的可以查看文档:文档地址 { //该模块名字 "name":"test" , //版本 "version&quot ...

  7. python学习:修改字符串大小写

    修改字符串大小写 函数:title()字符串首字母大写,upper()字符串全部大写,lower()字符串全部小写. 代码举例: name = "ada lovelace"prin ...

  8. Python全栈开发之路 【第十六篇】:jQuey的动画效果、属性操作、文档操作、input的value

    01-动画效果 show 显示 概念:显示隐藏的匹配元素 语法:show(speed,callback) 参数: speed:三种预定速度之一的字符串('slow','normal','fast')或 ...

  9. 在pycharm中每次运行代码不使用console而使用run

    问题:在pycharm中点击run运行程序,发现没有打开run窗口,而是打开的Python console窗口. 解决方法:打开菜单栏run->edit configurations,把下图中的 ...

  10. MySQL最优配置模板( 5&period;6&amp&semi;5&period;7转)

    [client] user = root --用户 password = 1111aaA_ -- 密码 [mysql] prompt = [\\u@\\p][\\d]>\\_ -- cmd控制台 ...