第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

項(xiàng)目運(yùn)行起來(lái)后找不到j(luò)dbc.properties文件里面配置的鍵值對(duì)。。。下面是我的配置文件

異常的一部分------------------------------------------------------------------------------

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].. Returning null.

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

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

[DEBUG] 2017-02-15 19:09:53 - Could not find key 'jdbc.driverClass' in any property source. Returning [null]

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

[DEBUG] 2017-02-15 19:09:53 - Found key 'jdbc.driverClass' in [localProperties] with type [String] and value 'com.mysql.jdbc.Driver'

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

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

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

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

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

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

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

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

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

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

[DEBUG] 2017-02-15 19:09:53 - Could not find key 'jdbc.url' in any property source. Returning [null]

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

[DEBUG] 2017-02-15 19:09:53 - Found key 'jdbc.url' in [localProperties] with type [String] and value 'jdbc:mysql://localhost:3306/ssh_employee'

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

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

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

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

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

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

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

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

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

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

[DEBUG] 2017-02-15 19:09:53 - Could not find key 'jdbc.username' in any property source. Returning [null]

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

[DEBUG] 2017-02-15 19:09:53 - Found key 'jdbc.username' in [localProperties] with type [String] and value 'root'

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

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

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

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

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

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

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

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

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

jdbc.properties----------------------------------------------------------------------------------

jdbc.driverClass=com.mysql.jdbc.Driver

jdbc.url=jdbc:mysql://localhost:3306/ssh_employee

jdbc.username=root

jdbc.password=root

applicationContext.xml部分--------------------------------------------------------------------

<!-- 引入外部屬性文件 -->

<context:property-placeholder location="classpath:jdbc.properties"/>

<!-- 配置連接池 -->

<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">

<property name="driverClass" value="${jdbc.driverClass}"></property>

<property name="jdbcUrl" value="${jdbc.url}"></property>

<property name="user" value="${jdbc.username}"></property>

<property name="password" value="${jdbc.password}"></property>

</bean>

web.xml部分-----------------------------------------------------------------------------

<listener>

????<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>

</listener>

<context-param>

????<param-name>contextConfigLocation</param-name>

????<param-value>classpath:applicationContext.xml</param-value>

</context-param>


正在回答

4 回答

http://blog.csdn.net/superdog007/article/details/48022983

參考這個(gè),我改了之后有效果。

0 回復(fù) 有任何疑惑可以回復(fù)我~

<context:property-placeholder location="classpath:jdbc.properties" ignore-unresolvable="true"/>


1 回復(fù) 有任何疑惑可以回復(fù)我~

bean里面配置的屬性property的name要與class類里面的屬性名字一致

0 回復(fù) 有任何疑惑可以回復(fù)我~

路徑?jīng)]寫對(duì)

0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

慕粉3798235

我也出現(xiàn)了這種問(wèn)題,路徑該怎樣顯示呢,一直不明白
2017-03-05 回復(fù) 有任何疑惑可以回復(fù)我~
#2

慕哥7619466

首先你確定你的jdbc.properties是不是在classpath下面放著,
2017-04-26 回復(fù) 有任何疑惑可以回復(fù)我~
#3

慕哥7619466 回復(fù) 慕粉3798235

首先你確定你的jdbc.properties是不是在classpath下面放著,
2017-04-26 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

項(xiàng)目運(yùn)行起來(lái)后找不到j(luò)dbc.properties文件里面配置的鍵值對(duì)。。。下面是我的配置文件

我要回答 關(guān)注問(wèn)題
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)