Question

I am trying to understand how Spring social works. I've imported the spring social quickstart 3.0.x from github. It's working well. But i don't understand some points such as this: In controllers.xml file there are :

     <mvc:view-controller path="/signin" />
     <mvc:view-controller path="/signout" />
  1. Why there is no view-name attribute ?
  2. Which views will be displayed for each or which controller and which method will be executed ?

Thanks

Was it helpful?

Solution

From the spring documentation

mvc:view-controller registers a ParameterizableViewController that selects 
a view for rendering. In this case, when "/" is requested, the welcome view is  
rendered.The actual view template is a .jsp resolved inside the /WEB-INF/views 
directory.

Here if you have registered <mvc:view-controller path="/signin" /> then it will resolve to signin.jsp

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top