spring-framework
spring-framework copied to clipboard
@Transactional should fail in @PostConstruct if AspectJ transaction aspect not initialized yet
Using Aspectj mode with runtime aspectj weaver.
Inside a @PostConstruct
, calling a method with @Transactional
doesn't start a transaction.
The transactional aspect forwards call to the method, but no transaction is started. This is an invalid behavior, I was expecting an exception.
Sample repo: https://github.com/cdalexndr/spring-boot-issue-26710
Spring Boot 2.4.4