Is there a way to simplify the transaction management configuration in Spring?

xiaoxiao2021-03-06  34

1: Java code:

PROPAGATION_REQUIRED, readOnly PROPAGATION_REQUIRED prOPagation_required PropAgation_required PropAgation_required, readonly

There are multiple services in the system, but most of our transaction strategies are the same. Do you have to write a proxy configuration every service? How does multiple service use the same transaction policy to simplify such configuration? 2:

XML code:

<-! Transactional proxy for the services -> propagation_required 3:

Readonly wrote:

XML code:

<-! Transactional proxy for the services -> propagation_required This kind of BaseTxProxy may also be instantiated. Is it better to add the Abstract = "True" attribute, take BaseTxProxy just as a template? Because ItemService is needed. 4: Look at the document, the original abstract is like this, hoho, and learned a trick ... 5: I used Readonly's method unsuccessful. Error: 1.Abstract property is not defined 2.org. springframework.beans.NotWritablePropertyException: Invalid property 'transactionManager' of bean class [com.bbs.service.imp.ForumServiceImp]: property 'transactionManager' is not writable how to set this attribute will Ah, there is no definition of Ah, my profile it's here:

Java code:

< Property name = "TransactionAttributes"> prOPagation_required propagation_required, readonly < / bean> Is my version not high enough? I am also 1.1.1 A 6:

general wrote: I used the method readonly unsuccessful Ah, error: 1.abstract attribute is not defined 2.org.springframework.beans.NotWritablePropertyException: Invalid property 'transactionManager' of bean class [com.bbs.service.imp.ForumServiceImp] : Property 'TransactionManager' Is Not Writable How to Go Set This property is Ah, there is no definition, my configuration file is here:

Java code:

< Property name = "TransactionAttributes"> prOPagation_required propagation_required, readonly < / bean> Is my version not high enough? I am also 1.1.1 a place seems to have a problem, try this

Java code:

< Property name = "TransactionAttributes"> prOPagation_required propagation_required, readonly 7:

Java code:

< Property name = "TransactionAttributes"> prOPagation_required propagation_required, readonly This is also possible!

转载请注明原文地址:https://www.9cbs.com/read-66492.html

New Post(0)