vendredi 5 février 2016

Mapping every URL that has no file extension to a sub-path in Spring Boot?

I have the following web app layout:

/webapp
    /pathA
        /index.jsp
        /style.css
    /pathB
        /pathB1
            /index.jsp
    ...
    /pathX
        /index.jsp

How can I create a mapping in Spring Boot such that:

/pathA maps to /pathA/index.jsp, and /pathB/pathB1 maps to /pathB/pathB1/index.jsp, etc.

Essentially, any URI that has no file extension specified (e.g. /pathA/style.css should be excluded from this mapping) should be redirected to an URI that has index.jsp appended. I'd like to apply the mapping as a general rule, so I don't have to specify every possible path that should be mapped like this.




Aucun commentaire:

Enregistrer un commentaire