(2)<bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
暫時解決了我遇到的問題
要是沒出錯,又沒生成表的記得看下有沒導(dǎo)入mysql-connector-java-5.1.-bin.jar這個連接數(shù)據(jù)庫的jar包!?。?!調(diào)了一晚上,發(fā)現(xiàn)沒導(dǎo)入jar包 =_=!
暫時解決了我遇到的問題
要是沒出錯,又沒生成表的記得看下有沒導(dǎo)入mysql-connector-java-5.1.-bin.jar這個連接數(shù)據(jù)庫的jar包!?。?!調(diào)了一晚上,發(fā)現(xiàn)沒導(dǎo)入jar包 =_=!
2017-06-21
(1)出現(xiàn)錯誤的同學(xué)可以試試把sql的連接寫死如下:
<!-- 引入外部的屬性文件 (這個注釋掉)
<context:property-placeholder location="classpath:jdbc.properties" />
-->
<!-- 配置連接池,例子如下 把${}換成實際例子-->
<property name="driverClass" value="com.mysql.jdbc.Driver" />
然后把下面這句的3改成4
<!-- 引入外部的屬性文件 (這個注釋掉)
<context:property-placeholder location="classpath:jdbc.properties" />
-->
<!-- 配置連接池,例子如下 把${}換成實際例子-->
<property name="driverClass" value="com.mysql.jdbc.Driver" />
然后把下面這句的3改成4
2017-06-21
最新回答 / 慕標(biāo)8641556
把 mysql-connector-java-5.1.7-bin.jar 替換為?sqljdbc.jar 再修改驅(qū)動屬性?改為:com.microsoft.sqlserver.jdbc.SQLServerDriver沒驗證正確性
nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'context:property-placeholder'.
2017-06-16
,254 ERROR org.springframework.web.context.ContextLoader:308 - Context initialization failed
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 13 in XML document from class path resource [applicationContext.xml] is invalid;
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 13 in XML document from class path resource [applicationContext.xml] is invalid;
2017-06-16
我用的spring-framework-4.2.4.RELEASE-dist。在applicationContext.xml中怎樣配置約束條件。我自己搞得出錯了。
2017-06-16
最新回答 / qq_行走江湖
可能是哪塊語法錯誤