Is constructor injection possible in Spring configuration classes?

前端 未结 2 1036
太阳男子
太阳男子 2021-01-19 11:06

If I have a Spring configuration class (i.e. a class annotated with @Configuration) can I use constructor injection ?

As it stands if I add one I get a no default co

2条回答
  •  一个人的身影
    2021-01-19 11:46

    There is a bug report about this limitation. It will be fixed with Spring 4.3.

    Please note that another bug report (not fixed yet today fixed in 4.3-RC1) report a problem when using this very new feature and injecting generics in constructor of a @Configuration class.

提交回复
热议问题