spring question# Java - 爪哇娇娃
c*n
1 楼
in the book "spring in action", MVC chapter,
the example defines the view-resolver by declaring a bean
class="org.springframework.web.
➥ servlet.view.InternalResourceViewResolver">
/WEB-INF/jsp/
.jsp
but it does not attach the bean anywhere (for example as a property of
the servlet in web.xml )
so how does spring know that this bean is a view resolver? does it decide
that this implements ViewResolver so that it must use this bean for resolver
?? what if I declare multiple beans that implement resolver ?
the example defines the view-resolver by declaring a bean
➥ servlet.view.InternalResourceViewResolver">
but it does not attach the bean anywhere (for example as a property of
the servlet in web.xml )
so how does spring know that this bean is a view resolver? does it decide
that this implements ViewResolver so that it must use this bean for resolver
?? what if I declare multiple beans that implement resolver ?