In this blog post Mark Seemann explains the different approaches to configure dependencies with a dependency injection framework. Convention over Configuration is one of this approaches. In the .NET world there are multiple DI frameworks which offers this feature (e.g. NInject, MEF 2). I'm searching for a DI framework with Convention over Configuration in the Java world. I looked at Spring and Guice but neither of them seems to offer this feature.
Asked
Active
Viewed 507 times
2 Answers
0
I would argue that hk2 has a convention over configuration like feature with automatic service population. It requires that you use the hk2-inhabitant-generator at build time to put some metadata into your built jar files. However, after that it becomes very simple to populate hk2 with your services. This is how GlassFish uses DI, where classloading at the start of the server had to be kept to a minimum in order to increase boot performance.

jwells131313
- 2,364
- 1
- 16
- 26
0
There's one for JavaFX by using afterburner.fx is JavaFX MVP framework based on Convention over Configuration and Dependency Injection.

Magician
- 73
- 8