probably it's a very stupid question, but I couldn't find anything on the internet.
What the difference between writing <mvc:mapping path="/**"/>
and <mvc:mapping path="/*"/>
in Spring?
antMatcher(String antPattern) - Allows configuring the HttpSecurity to only be invoked when matching the provided ant pattern. mvcMatcher(String mvcPattern) - Allows configuring the HttpSecurity to only be invoked when matching the provided Spring MVC pattern.
The MVC term signifies that it follows the Model View Controller design pattern. So, Spring MVC is an integrated version of the Spring framework and Model View Controller. It has all the basic features of the core Spring framework like Dependency Injection and Inversion of Control.
Spring Boot is considered a module of the Spring framework for packaging the Spring-based application with sensible defaults. Spring MVC is considered to be the model view controller-based web framework under the Spring framework. For building a Spring-powered framework, default configurations are provided by it.
In the Spring framework, you have to build configurations manually. In Spring Boot there are default configurations that allow faster bootstrapping. Spring Framework requires a number of dependencies to create a web app. Spring Boot, on the other hand, can get an application working with just one dependency.
It is documented here:
Basically the Spring supports "Ant style globbing". Thus path="/*"
matches any URL in the "/"
directory1, and path="/**"
matches any URL in the entire directory tree.
The document primarily talks about request mappings specified using annotations, but wirings specified using XML have the same meaning.
1 - I am using the term "directory" loosely here. Strictly speaking these are not directories at all. But you know what I mean ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With