spring-framework icon indicating copy to clipboard operation
spring-framework copied to clipboard

@Transactional should fail in @PostConstruct if AspectJ transaction aspect not initialized yet

Open cdalexndr opened this issue 3 years ago • 1 comments

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

cdalexndr avatar May 29 '21 19:05 cdalexndr