How does Spring MVC identify the Model, View, and Controller files?

0

I wanted to know how Spring traces these files. So far I know that Spring MVC has DispatcherServlet which is responsible for sending requests to controllers that respond to such URL. But how does Spring do to return / render the correct page? Where is their place registered?

I have seen in some projects in GitHub that devs declare in% with a .xml with a prefix and a suffix, but when I fetch this prefix (the supposed directory) does not have any View files, they are or a directory above, or elsewhere.

    
asked by anonymous 18.04.2018 / 14:02

1 answer

0

The prefix and suffix of the files that are going to be observed can be in the Properties as well:

spring.mvc.view.prefix= # Spring MVC view prefix.
spring.mvc.view.suffix= # Spring MVC view suffix.

Complementing, if you are in a maven project, it is customary that by default the files are in "/ src / main / webapp ..."

If you can post more information about your project, it would help us.

    
17.05.2018 / 14:09