saskodh / framework

Lightweight web framework for NodeJS inspired by Spring framework
26 stars 5 forks source link

@Import should merge @Configurations on initialization #44

Open saskodh opened 8 years ago

saskodh commented 8 years ago

Background

As we do everyting at the initialization time (when ApplicationContext is created) the import (merging of configuration classes) should also be done there. The component scan and property source was already refactored in this story.

Task

Store the imported @Configuration classes as metadata (in the ConfigurationData class) and process them when the ApplicationContext is started.

Note: @Configuration classes may have @Profile which needs to be applied to all components represented by them (ex. scanned or declared).