Test Fails with DataJpaTest Annotation

Thank you for the suggestion. When I initially used your implementation, I ran into a circular dependency issue within Spring. I think it was primarily related to the CommandGateway being Autowired into some of my other classes. If I add the @Lazy annotation to the CommandGateway properties of my PointExpirationService and AccountCommandController classes then the application is able to start.

To me adding in this annotation sporadically indicates I’m missing something. As I believe the main reason for this change is to have more granular control over how the application context loads.

That being said, you can see the changes in my PR (I hope). I was wondering if you could either clarify, or help me understand why it is only in these two places that the @Lazy annotation is required and if there is some additional configuration that I should consider?

If this isn’t really the place for this discussion, please don’t feel like this needs to be answered, as I know we’re getting a little off the topic and this is something very specific to my implementation at this point.