no transaction is in progress
in is No Transaction progress
2023-09-11 14:21:22 时间
主要: <prop key="hibernate.allow_update_outside_transaction">true</prop>
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:p="http://www.springframework.org/schema/p" xmlns:jpa="http://www.springframework.org/schema/data/jpa" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.3.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.3.xsd http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa.xsd" default-lazy-init="true"> <!--配置数据源--> <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close"> <property name="driverClass" value="${jdbc.driver}" /> <!--数据库连接驱动--> <property name="jdbcUrl" value="${jdbc.jdbcUrl}" /> <!--数据库地址--> <property name="user" value="${jdbc.user}" /> <!--用户名--> <property name="password" value="${jdbc.password}" /> <!--密码--> <property name="maxPoolSize" value="${jdbc.maxPoolSize}" /> <!--最大连接数--> <property name="minPoolSize" value="${jdbc.miniPoolSize}" /> <!--最小连接数--> <property name="initialPoolSize" value="${jdbc.initialPoolSize}" /> <!--初始化连接池内的数据库连接--> <property name="maxIdleTime" value="${jdbc.maxIdleTime}" /> <!--最大空闲时间--> </bean> <!--配置session工厂--> <bean id="sessionFactory" class="org.springframework.orm.hibernate5.LocalSessionFactoryBean"> <property name="dataSource" ref="dataSource" /> <property name="packagesToScan" value="com.kintech.model" /> <property name="hibernateProperties"> <props> <prop key="hibernate.hbm2ddl.auto">${hibernate.hbm2ddl.auto}</prop> <!--hibernate根据实体自动生成数据库表--> <prop key="hibernate.dialect">${hibernate.dialect}</prop> <!--指定数据库方言--> <prop key="hibernate.show_sql">${hibernate.show_sql}</prop> <!--在控制台显示执行的数据库操作语句--> <prop key="hibernate.format_sql">${hibernate.format_sql}</prop> <!--在控制台显示执行的数据哭操作语句(格式)--> <prop key="hibernate.cache.use_second_level_cache">${hibernate.cache.use_second_level_cache}</prop> <prop key="hibernate.cache.use_query_cache">${hibernate.cache.use_query_cache}</prop> <!-- 查询缓存 --> <prop key="hibernate.cache.provider_class">${hibernate.cache.provider_class}</prop> <prop key="hibernate.cache.region.factory_class">${hibernate.cache.region.factory_class}</prop> <!-- 很重要,不然会报:no transaction is in progress 错误 --> <prop key="hibernate.allow_update_outside_transaction">true</prop> </props> </property> </bean> </beans>
相关文章
- go build报错,提示错误can‘t load package: package xxx is not in GOROOT
- 【异常】ERROR in ch.qos.logback.core.joran.spi.Interpreter@159:22 - no applicable action for [charset], current ElementPath is [[configuration][appender][encoder][charset]]
- 后台异常 - Content is not allowed in prolog
- 【MySQL】in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
- [Tailwind] Apply mobile-first Responsive Classes in Tailwind
- [Recompose] Render Nothing in Place of a Component using Recompose
- tesseract is not installed or it's not in your PATH
- Execution error: 'the function name is not a recognized built-in function name'
- where is url parameter evaluated in UI5 core q.sap.getUriParameters
- SAP ABAP关键字在Chrome浏览器里高亮显示的实现原理 - How is ABAP keyword highlight implemented in Chrome
- how is __metadata.media_src generated in backend
- workflow and email in QD3 - IS_INBOX_USER method
- How where used list in SAP GUI is implemented
- Trace SAP OData execution in CRM backend system
- Step by step to create web service in Cloud Application studio and bind it to a custom action in sta
- the code place where the binding is converted to final value displayed in u
- SAP CRM One Order object type in line item - when it is filled
- what does packaging mean in pom.xml
- 解决The type or namespace name 'XXXX' does not exist in the namespace 'XXXXXXXXX' 的错误
- atitit.解决net.sf.json.JSONException There is a cycle in the hierarchy
- how is home button implemented in Fiori launchpad
- How is dependent libraries defined in metadata loaded in the runtime
- 已解决TabError: Inconsistent use of tabs and spaces in indentation
- kafka.common.KafkaException: Failed to acquire lock on file .lock in /tmp/kafka-logs. A Kafka instance in another process or thread is using this directory.
- Ubuntu20.04下,qt交叉编译报错::15: warning: identifier ‘nullptr‘ is a keyword in C++11 [-Wc++0x-compat]
- VC2015提示warning C4996: 'MBCS_Support_Deprecated_In_MFC': MBCS support in MFC is dep
- 【PAT 1151】 LCA in a Binary Tree C++版