在spring,如何声明bean是单例或非单例的,默认的bean是单例还是非单例

2025-06-22 09:14:50
推荐回答(1个)
回答1:

默认是单例scope="singleton",非单例的话,声明scope="prototype"