How to define a Spring bean using annotation instead of XML?

后端 未结 2 2069
旧巷少年郎
旧巷少年郎 2021-02-07 10:11

I have defined in a xml config file:


this works fine.

The b

2条回答
  •  春和景丽
    2021-02-07 10:35

    There's documentation regarding this; you'll want a stereotype annotation like @Component.

    Stereotype bean annotations

提交回复
热议问题