citerus / dddsample-core

This is the new home of the original DDD Sample app (previously hosted at sf.net)..
MIT License
4.97k stars 1.47k forks source link

Wrong Beans init order #18

Closed kevinojt closed 7 years ago

kevinojt commented 7 years ago

Spring initializes Beans in declared order.

In DDDSampleApplicationContext.java

“graphTraversalService” should be initialized before "routingService" because "routingService" requires "graphTraversalService"

"handlingEventFactory" should be initialized before "handlingEventRepository" because "handlingEventRepository" requires "handlingEventFactory"

Or they will just get null pointers.

mackapappa commented 7 years ago

You are correct, thanks!