Skip to content

@EnableTransactionManagement proxyTargetClass not control by spring.aop.proxyTargetClass #8434

@Dreampie

Description

@Dreampie

if use @Transactional,and set spring.aop.proxyTargetClass=false, this class also create by cglib not jdk proxy,you must config @EnableTransactionManagement(proxyTargetClass=false) to use jdk proxy with @Transactional

@Service
public class DemoServiceImpl implements DemoService {

    @Transactional
    public void test() {
        System.out.println("Test");
    }
}

And @EnableTransactionManagement proxyTargetClass default value is false, why spring boot change to true?

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions