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
Comment From: cdalexndr
In some cases, using spring.main.lazy-initialization=true
can delay @PostConstruct
until transactional system works.