spring 与jpa整合抛Not supported by BasicDataSource 异常,
要把spring 里面hibernate里配置数据源的部分注释掉
<bean id="sessionFactory"
class="org.springframework.orm.hibernate4.LocalSessionFactoryBean" >
<property name="dataSource" ref="dataSource"/>
<!-- 配置文件方式 -->
<!-- <property name="mappingLocations">
<list>
<value>classpath:liang/domain/User.hbm.xml</value>
</list>
</property> -->
<!-- 扫描包注解hibernate方式 -->
<property name="packagesToScan">
<list>
<value>liang.domain</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.MySQLDialect
</prop>
<!-- 注释了这段就不抛 Not supported by BasicDataSource 异常-->
<!-- <prop key="show_sql">${jdbc.show_sql}</prop>
<prop key="jdbc.use_scrollable_resultset">false</prop>
<prop key="hibernate.jdbc.batch_size">50</prop>
<prop key="hibernate.hbm2ddl.auto">update</prop>
<prop key="hibernate.connection.url"><![CDATA[jdbc:mysql://127.0.0.1:3306/springmvc?useUnicode=true&characterEncoding=UTF-8]]></prop>
<prop key="hibernate.connection.driver_class">com.mysql.jdbc.Driver</prop>
<prop key="hibernate.connection.username">root</prop>
<prop key="hibernate.connection.password">123456</prop>
<prop key="hibernate.cache.region.factory_class">org.hibernate.cache.ehcache.EhCacheRegionFactory</prop> -->
<!-- <prop key="hibernate.current_session_context_class">org.springframework.orm.hibernate4.SpringSessionContext</prop> -->
</props>
</property>
</bean>
分享到:
相关推荐
在软件开发过程中,遇到“Operation Not Supported”错误意味着试图执行一个不被当前环境、库、框架或设备支持的操作。这种错误常见于编程中,尤其是当开发者尝试使用某个库或框架的某个特定功能,但该功能因为版本...
解决SVN上传提示Empty directoriesis not supported 解决SVN上传提示Empty directoriesis not supported
Protocol not supported(解决方案).md
当您遇到"405 - HTTP method GET is not supported by this URL"这样的问题时,通常意味着您的服务器端代码没有正确处理GET请求,或者请求被误定向到了一个不期望GET方法的Servlet。 首先,我们需要理解HTTP协议中...
网上各种教程无法解决这个工具提示 not supported not listening问题,这个安装包给出了所有需要的文件,并给出了详细的指引。 绝大多数情况你会安装成功。如果你成功了,或者失败了,请给我评论。大家看评论区。
ThinkPHP6.1 Filesystem Driver aliyun not supported
网上各种教程无法解决这个工具提示 not supported not listening问题,这个安装包给出了所有需要的文件,并给出了详细的指引。 绝大多数情况你会安装成功。如果你成功了,或者失败了,请给我评论。大家看评论区。 ...
部分程序在centos下安装时提示:Graphical installers are not supported by the VM
Office安装错误Per-user install not supported.txt
NULL 博文链接:https://lectery.iteye.com/blog/485357
Jun 08 00:02:46 localhost.localdomain firewalld[854]: WARNING: ICMP type 'beyond-scope' is not supported by the kernel for ipv6. Jun 08 00:02:46 localhost.localdomain firewalld[854]: WARNING: beyond-...
C#连接MYSQL8.0的版本老是提示[Authentication method 'caching_sha2_password' not supported by any of the available plugins.] 这个错误,换低版本的MYSQL连接又没有问题,现在把我的经验分享一下,解决这个连接...
IDEA中的.VUE文件报错 Export declarations are not supported by current JavaScript version 和Export declarations are not supported by current JavaScript version报错都是一个解决办法 js文件报错 第一步,...
【使用腾讯TBS浏览Office】:腾讯TBS(Tuoku Browser Service)是腾讯推出的一款浏览服务,它基于强大的X5内核技术。X5内核是腾讯为移动设备设计的一款高性能、低耗能的浏览器核心,广泛应用于微信、QQ等腾讯系应用...
Oracle数据库在运行过程中,经常会遇到各种错误代码,错误代码ORA-00845是其中的一个,它是指“MEMORY_TARGET not supported on this system”。这个错误一般发生在尝试在不支持MEMORY_TARGET参数的系统上设置该参数...
【正文】 在移动应用开发中,用户经常需要查看和处理各种类型的文档,如.doc、.pdf等。为了提供良好的用户体验,开发者需要实现文档的在线预览功能,而无需下载到本地。在这种场景下,腾讯浏览服务(Tencent Browse...
在处理软件开发和维护过程中,ERR_OPERATION_NOT_SUPPORTED错误是一种常见的问题提示,表示在尝试执行某个操作时,系统或应用程序未能识别并支持该操作。该错误可能由多种原因导致,包括但不限于API或库的版本过旧、...
在软件开发中,遇到`NotSupportedError`错误是相对常见的现象,它通常表示某个操作或功能因为多种原因不再被支持。解决这个问题需要根据上下文环境和所使用的编程语言或框架采取相应措施。本文将提供一个通用的解决...
"WIN10 多用户远程桌面 not supported 补丁-ver.10.0.19041.2913" 这个标题提到了两个关键点。首先,它指的是Windows 10操作系统,特别是版本10.0.19041.2913。其次,它提到了一个针对多用户远程桌面连接问题的补丁...