java jdbc路径配置文件_项目运行起来后找不到jdbc.properties文件里面配置的键值对。。。下面是我的配置文件...

这篇博客主要讨论了在Java项目中加载jdbc.properties配置文件时遇到的问题。通过日志可以看到,程序尝试从多种属性源加载键值对,包括环境变量、JNDI、系统属性等,最终在本地属性文件找到并成功加载了数据库连接的相关配置,如driverClass、url、username和password。
摘要由CSDN通过智能技术生成

异常的一部分------------------------------------------------------------------------------

Loading properties file from class path resource [jdbc.properties]

[DEBUG] 2017-02-15 19:09:53 - Adding [localProperties] PropertySource with lowest search precedence

[DEBUG] 2017-02-15 19:09:53 - Searching for key 'jdbc.driverClass' in [environmentProperties]

[DEBUG] 2017-02-15 19:09:53 - Searching for key 'jdbc.driverClass' in [servletConfigInitParams]

[DEBUG] 2017-02-15 19:09:53 - Searching for key 'jdbc.driverClass' in [servletContextInitParams]

[DEBUG] 2017-02-15 19:09:53 - Searching for key 'jdbc.driverClass' in [jndiProperties]

[DEBUG] 2017-02-15 19:09:53 - Looking up JNDI object with name [java:comp/env/jdbc.driverClass]

[DEBUG] 2017-02-15 19:09:53 - Converted JNDI name [java:comp/env/jdbc.driverClass] not found - trying original name [jdbc.driverClass]. javax.naming.NameNotFoundException: Name [jdbc.driverClass] is not bound in this Context. Unable to find [jdbc.driverClass].

[DEBUG] 2017-02-15 19:09:53 - Looking up JNDI object with name [jdbc.driverClass]

[DEBUG] 2017-02-15 19:09:53 - JNDI lookup for name [jdbc.driverClass] threw NamingException with message: Name [jdbc.driverClass] is not bound in this Context. Unable to find [jdbc.driverClass].. Returni

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值