1) Is it compulsory to useNo. If you want the default ("singleton") then you don't need to specify.@Scope
attribute?
2) What if we do not use?Then your application will only create one instance of the bean.
3) Is it good practice to useNo. It does not make sense for an application to have more than one instance of a controller class (or a repository). If you have a need to use both annotations together, then you are not modelling your classes very well.@Scope
with@Controller
?
No comments:
Post a Comment