Configuration for Transaction Management [Spring/Java]

I would like to share some configuration for transaction management in Spring Framework.

🏀 Set transaction automatically

It is a configuration to set @Transactional under webapp.sample.service package hierarchy.

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns=""

<!-- Transaction declaration -->
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:method name="*" isolation="READ_COMMITTED" />

<!-- all classes under webapp.sample.service package hierarchy. Transaction boundary is the service layer -->
<aop:advisor pointcut="execution(public * com.m3.hqmr.service..*.*(..)) and @target(org.springframework.stereotype.Service)" advice-ref="txAdvice" />


This configuration uses AOP(Aspect Oriented Programming) which is adding new processing without changing original source.
AOP is a mechanism for “cross-cutting issue” such as outputting trace log, managing transaction or etc.

🗻 References

🖥 Recommended VPS Service

VULTR provides high performance cloud compute environment for you. Vultr has 15 data-centers strategically placed around the globe, you can use a VPS with 512 MB memory for just $ 2.5 / month ($ 0.004 / hour). In addition, Vultr is up to 4 times faster than the competition, so please check it => Check Benchmark Results!!